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

Which of the three elements of butterfield et al.'s critical incident analysis is the most effective contributor to organizational learning and knowledge?
i need help on 3 problems​
Using the plantwide overhead rate, what percentage of the total overhead cost is allocated to product y and product z
SOMEONE PLEASE ANSWER THIS ASAP FOR BRAINLIEST!!!!! A. NO CHANGE B. who had C. whom D. which
There are 2 gallons of apple juice if 7 kids drink all the juice what fraction of the gallons did each kid get
The Schlieffen Plan was designed by the German military to Select one: a. address U.S. troop deployments in France. b. strengthen the defense of Germany's colon
The most common rule for forming plural nouns is
I need help please: (1) There are some common reasons that small businesses fail. (2) One is managers who don't have enough knowledge or experience. (3) Some pe
How is dna methylation used in dna repair?
What is three more expressions for 6 exponent 3​