摘要:
#include<iostream>using namespace std;int main(){ float a; int b; a=5.8; b=a; cout<<"a="<<a<<'\n'<<"b="<<b<<endl; return 0;} 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ bool flag; flag=true; if(flag) cout<<false<<endl; return 0; } #include<iostream>using namespace std; 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ float x; x=2.4; cout<<"x="<<x<<endl; return 0;} 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ long long int a; a=12345678901234; cout<<a<<endl; return 0;} 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ for(int a=1;a<5;a++){ for(int b=1;b<=2*a-1;b++){ cout<<"*"; } cout<<'\n'; } for(int a=1;a<4;a++){ fo 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ unsigned short a; short int b=-2; a=b; cout<<"a="<<a<<endl; return 0; } 阅读全文
摘要:
#include<iostream>using namespace std;int main(){ float x; int i; x=3.6; i=(int)x; cout<<"x="<<x<<",i="<<i<<endl; return 0;} 阅读全文
摘要:
#include<iostream>using namespace std;#define price 40 int main() { int num,total; num=10; total=num*price; cout<<"total="<<total<<endl; return 0; } 阅读全文
摘要:
#include<iostream>using namespace std;int main() { char c1,c2; c1='a'; c2='b'; c1=c1-32; c2=c2-32; cout<<c1<<'\n'<<c2<<endl; return 0;} 阅读全文