Q-1.Write a C program to input two numbers from user and calculate their sum. C program to add two numbers and display their sum as output. How to add two numbers in C programming.

0
1.  #include<stdio.h>
int main ()
{
    int a,b,sum;
    a=10;
    b=20;
    sum=a+b;
    printf("Enter Number:%d",sum);

    return 0;
}

2.  #include<stdio.h>
int main ()
{
    int a=10,b=20,sum;

    sum=a+b;
    printf("Enter Number:%d",sum);
    return 0;
}

Post a Comment

0Comments
Post a Comment (0)