1. WAP in C to input two numbers and display their sum.

Code

#include <stdio.h>
int main(){
    int num1,num2,sum;
    printf("Enter the first number: ");
    scanf("%d",&num1);
    printf("Enter the seconnd number: ");
    scanf("%d",&num2);
    sum = num1 + num2;
    printf("sum is: %d",sum);
    return 0;
}

Output

C Programming

0/Post a Comment/Comments

---[[ For More Inquiry Comment Down Below or Contact Us ]]---

Previous Post Next Post

Ads Before Post