#include<iostream> #include<math.h> using namespace std; int main(){ int a=0; cin>>a; cout<<"2^"<<a<<" = "<<pow(2.0,a)<<endl; return 0; }
#include<iostream> using namespace std; double x(int a){ double b=1; for(int i=1;i<=a;i++){ b*=i; } return b; } int main(){ double S=0; int N=0; if(N>10||N<0){ return 0; } cin>>N; double A=1; for(int j=1;j<=N;j++){ A=x(j); S+=A; } cout<<(int)S<<endl; return 0; }
#include<iostream> using namespace std; int main(){ cout<<"This is a simple problem."<<endl; return 0; }
#include<iostream> using namespace std; int main(){ int N;//正方形的边长 char c;//输出的字符 cin>>N; cin>>c; int n; //用于实现四舍五入 if(N%2==0){ n=N/2; } else{ n=(N+1)/2; } for(int i=0;i<n;i++){ for(int j=0;j<N;j++){ cout<<c; } cout<<endl; } return 0; }
标签:std,7.15,main,int,namespace,using,include From: https://www.cnblogs.com/xuxingkai/p/17557014.html