摘要:
#include <iostream> using namespace std; int main() { //变量声明 char c; double x,y; //测试自增 cout<<"++E and E++ :"<<endl; c='B'; cout<<"c="<<++c<<endl; //输 阅读全文
posted @ 2021-06-29 16:33
江南王小帅
阅读(40)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main() { //定义枚举类型,并指定其枚举元素的值 enum color ; //声明枚举变量a和b,并为枚举变量a赋初值 enum color a = RED; color b; //合法,与C语言不同 阅读全文
posted @ 2021-06-29 16:23
江南王小帅
阅读(21)
评论(0)
推荐(0)
摘要:
#include<iostream>const double PI = 3.14;using namespace std; int main(){ //declare variables double r, l, s; // enter the radius of circle cout << "r 阅读全文
posted @ 2021-06-29 16:07
江南王小帅
阅读(53)
评论(0)
推荐(0)
摘要:
#include <iostream> using namespace std; int main(){ //声明Bool变量 bool flag1 = false; bool flag2 = true; //输出bool变量 cout << "False:" << false << endl; c 阅读全文
posted @ 2021-06-29 15:55
江南王小帅
阅读(157)
评论(0)
推荐(0)
摘要:
#include <iostream> #define PI 3.1416 using namespace std; int main() { int i = 100; #if 1 cout << "i = " << i << endl; #endif #ifdef PI cout << "1 PI 阅读全文
posted @ 2021-06-29 15:42
江南王小帅
阅读(21)
评论(0)
推荐(0)
摘要:
// Project18.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include<iostream> using namespace std; int main() { char Tab = '\t'; //水平制表符 cout << 1 << Tab << 阅读全文
posted @ 2021-06-29 15:16
江南王小帅
阅读(180)
评论(0)
推荐(0)

浙公网安备 33010602011771号