-->
当前位置:首页 > 题库

PROGRAMMING:Use format specifiers to enter integers

Luz5年前 (2021-05-10)题库466
Practice the following code to discuss the use of format specifiers.
```
Case 03-02-02 input integer using format specifier
Case code 03-02-02. C
#include
int main(){
int a,b,c,d;
scanf("%d%d",&a,&b);
scanf("%d,%d",&c,&d);
printf("a=%d,b=%d,c=%d,d=%d\n",a,b,c,d);
printf("a+b+c+d=%d",a+b+c+d);
return 0;
}
```
###Input example:
```in
12 34 56,78
```
###Output example:
```out
a=12,b=34,c=56,d=78
a+b+c+d=180
```







answer:If there is no answer, please comment