Computer Science, asked by 9448613700, 1 year ago

Write a C ++ program to find the sum of two numbers

Answers

Answered by Harshitjita
3
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int a,b,c;
system("cls");
printf("Enter a digit");
scanf("%d",&a);
printf("Enter 2 digit");
scanf("%d",&b);
c=a+b;
printf("The sum is %d",c);
getch();
return(0);
}


If you like this answer and it works please click on botton (thank you)
Answered by Soñador
2

Answer:

#include<constream.h>

void main ();

{

clrscr();

int a, b, sum;

cout<<"\nEnter first number:";

cin>>a;

cout<<"\nEnter second number:";

cin>>b;

sum=a+b;

cout<<"\nSum of two numbers="<<sum;

getch();

}

Similar questions