Problem1394--附加-C语言的输入scanf与printf

1394: 附加-C语言的输入scanf与printf

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 317  Solved: 270
[Status] [Submit] [Creator:]

Description

带格式要求的输入
scanf(格式控制符,地址列表) 

 通过两种方法,输入2个整数 ,求和
 使用scanf与printf  使用cin与cout
int a,b; 
scanf("%d%d",&a,&b);
printf("%d",a+b);
int a,b; 
cin>>a>>b;
cout<<a+b;

 

Input

输入2个整数a,b,后将a+b和输出
体会sacnf与printf的作用(了解即可)

Output

输出相加的和

Sample Input Copy

10 20 

Sample Output Copy

30

Source/Category