Write a program in C to find sum of two numbers😀😀😀😀

 

                    VS CODE


#include<stdio.h>

int main()

{

int num1, num2, sum;

printf("Enter the first number:");
scanf("%d", &num1);

printf("Enter the second number:");
scanf("%d", &num2);

sum = num1+num2;

printf("The sum of these number is : %d\n", sum);
return 0;
}




                                  Turbo C++



#include<stdio.h>
#include<conio.h>

int main()

{

int num1, num2, sum;

    clrscr();

printf("Enter the first number:");
scanf("%d", &num1);

printf("Enter the second number:");
scanf("%d", &num2);

sum = num1+num2;

printf("The sum of these number is : %d\n", sum);
    getch();

return 0;
}

Post a Comment

0 Comments