Q:

Write a program in C++ to divide two numbers and print on the screen

0

Write a program in C++ to divide two numbers and print on the screen

Sample Output:

Divide two numbers and print:                                         
----------------------------------                                     
 The quotient of 30 and 10 is : 3

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>
using namespace std;
 
int main()
{
    cout << "\n\n Divide two numbers and print:\n";
	cout << "----------------------------------\n";
	int a;
	int b;
	int resdiv;
	a=30;
	b=10;
	resdiv=a/b;
	cout << " The quotient of "<< a << " and "<<b <<" is : "<< resdiv <<"\n\n" ;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now