How to write code in C
|
Input data must be read from console and the result must be written to console as well. The main function should return zero.
Example. Create a program which calculates the sum of two integer numbers.
Sample input:
5 3
Sample output:
8
Sample code:
Example. Create a program which calculates the sum of two integer numbers.
Sample input:
5 3
Sample output:
8
Sample code:
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a+b);
return 0;
}