How to write a program to divide two numbers in C++ language
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c;
cout <<"Enter two numbers to divide\n";
cin >> a >> b;
c=a+b;
cout <<"division of the numbers = " << c << end1;
getch();
}
OUTPUT: -
Enter two numbers to divide
8
4
division of the numbers = 2
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int a,b,c;
cout <<"Enter two numbers to divide\n";
cin >> a >> b;
c=a+b;
cout <<"division of the numbers = " << c << end1;
getch();
}
OUTPUT: -
Enter two numbers to divide
8
4
division of the numbers = 2


No comments:
Post a Comment