queenbaddest2021
queenbaddest2021 queenbaddest2021
  • 20-09-2021
  • Computers and Technology
contestada

Write a program in c++ to read two integers, calculate and print the smallest

Respuesta :

discipulus
discipulus discipulus
  • 20-09-2021

Answer:

#include<iostream>

using namespace std;

int main (){

int n1, n2;

cout<<"Enter 1st number";

cin>>n1;

cout<<"Enter 2nd number";

cin>>n2;

if(n1<n2){

cout<<"The 1st number is the smallest"<<endl<<" is= "<<n1;

}

else{

cout<<"The 2nd number is the smallest"<<endl<<" is= "<<n2;

}

}

return 0;

Answer Link

Otras preguntas

Please help 7. Sir George Grenville, King George's Chancellor of the Exchequer, enacted the Revenue Act of 1764 to raise revenue for maintenance of the Briti
This group lived in the present day state of Maine?
If a car goes five times as fast how much more kinetic energy will it have?
How long is an individual monarch's term of rule?
1000 raised to the 5th power
The number 15.24 is an example of a repeating decimal. True False
Who believed in the Ten Commandments? A. Hebrews B. Egyptians C. Canaanites
True or False The Crusades were religious wars.
Which statement is true about a solution that has a pH of 3? A. It is abnormal. B. It is acidic. C. It is alkaline. D. It is neutral.
oracle bones, daoism , and the Mandate of Heaven are all associated with early civilizations in the ?