Sum of 2 preset integers


Submit solution

Points: 10
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C

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


  • 0
    cbenu4cys22020  commented on May 6, 2023, 8:44 p.m.

    Return value is needed for this program , but doesn't even include any functions. Displays IR(invalid return) with void main().


  • 0
    kunisetti_nishnath  commented on May 4, 2023, 3:07 p.m.

    include<stdio.h>

    int main() { int a=10,b=20,c; c=a+b; printf("%d",c); }