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

can somebody help me with this question
What is the correct answer to this problem 8p+(-7p-3)
Which sentence has the most neutral connotation? A. The impractical plan was presented to the town council. B. The plan was presented to the town council. C.
Why do you think mythological references are popular sports teams and businesses today?
You discover a new species of slime mold that has a spore and stalk consisting of many cells. which group does it belong with?
how did the implementation of the articles of confederation affect the growth and stability of the newly created United States?
Regular exercise will always help you become more fit no matter how unhealthy you are when you begin an exercise program. true false
Does anyone know theses I saw some one helping another person with the same problems
what is 66 2/3% of 39
In the game of blackjack, a 2-card hand consisting of an ace and either a face card or a 10 is called a "blackjack." If a standard 52-card deck is used, determi