Simple a+b C language network 1000

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.