Question 1000: Simple a+b
Time limit: 1Sec memory limit: 128MB commit: 5541 Resolution: 2127
Title Description
Enter two integers a and B to calculate the a+b and
Note that the problem is multiple sets of test data
Input
Enter two integers a and b
Range not exceeding 2^10
Output
Beg A+b
Sample input
1 110 20
Sample output
230
Code:
#include <stdio.h>
int main () {
int A, B;
while (~SCANF ("%d%d", &a, &b)) printf ("%d\n", a+b);
return 0;
}
Question 1001:c Language Programming tutorial (third Edition) after class exercise 1.5
Time limit: 1Sec memory limit: 128MB commit: 6604 Resolution: 2526
Title Description
Please refer to the example of this chapter, write a C program, output the following information:
**************************
Hello world!
**************************
There is a space between Hello and world
* is also part of the output, do not print Hello world!
Input
No input required
Output
**************************
Hello world!
**************************
Sample input
No
Sample output
Hello world!**************************
Code:
(1)
#include <stdio.h>
int main () {
printf ("**************************\nhello world!\n**************************\n");
}
(2)
#include <stdio.h>
int main () {
printf ("**************************");
printf ("\ n");
printf ("Hello world!");
printf ("\ n");
printf ("**************************");
}
(3)
#include <stdio.h>
int main () {
printf ("**************************\n");
printf ("Hello world!\n");
printf ("**************************\n");
}
Simple a+b C language network 1000