Sum of 2 preset integers
Submit solution
C
Points:
10
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
TASK
Write a program in C to declare 3 integers a,b,c and then set a and b with the values 10,20 and c as the sum of a and b. Output the value of c.
Input Format:
This code has no user input
Output Format:
A single line containing the user output integer
Sample Input
Sample Output:
30
Comments
Return value is needed for this program , but doesn't even include any functions. Displays IR(invalid return) with void main().
include<stdio.h>
int main() { int a=10,b=20,c; c=a+b; printf("%d",c); }