标签:基础 cst double 编程基础 display opened out hide strong
01:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 cout<<"Hello, World!"<<endl; 6 return 0; 7 }
02:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { int a,b,c; 5 cin>>a>>b>>c; 6 cout<<b<<endl; 7 return 0; 8 }
03:
1 #include<cstdio> 2 #include<iostream> 3 using namespace std; 4 int main(){ 5 int a,b,c; 6 cin>>a>>b>>c; 7 printf("%8d %8d %8d",a,b,c); 8 return 0; 9 }
04:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 float a; 7 cin>>a; 8 printf("%0.3f",a); 9 return 0; 10 }
05:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 double a; 7 cin>>a; 8 printf("%0.12f",a); 9 return 0; 10 }
06:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 double a; 7 cin>>a; 8 cout<<(int)a; 9 return 0; 10 }
07:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 double a; 7 scanf("%lf",&a); 8 printf("%f\n%0.5f\n%e\n%g\n",a,a,a,a); 9 return 0; 10 }
08:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 char a; 7 cin>>a; 8 cout<<" "<<" "<<a<<endl; 9 cout<<" "<<a<<a<<a<<endl; 10 cout<<a<<a<<a<<a<<a<<endl; 11 return 0; 12 }
09:
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 char a; 7 cin>>a; 8 cout<<" "<<" "<<a<<endl; 9 cout<<" "<<a<<a<<a<<endl; 10 cout<<a<<a<<a<<a<<a<<endl; 11 cout<<" "<<a<<a<<a<<endl; 12 cout<<" "<<" "<<a<<endl; 13 return 0; 14 }
标签:基础 cst double 编程基础 display opened out hide strong
原文地址:https://www.cnblogs.com/Darkpurple/p/9441923.html