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

Read this excerpt from "A Student's Guide to Global Climate Change. " As the Earth gets warmer, plants and animals that need to live in cold places, like on mou
this has to be the last one , please help​
PLS HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The digestive system doesn’t work alone. After nutrients are absorbed in the small intestine, they
How do stars keep their spherical shape? The force of pressure pushing inward is balanced by the force of gravity pulling outward. Pressure from the rocky surfa
How would you use multiplication to identify a fraction that is equivalent to 4/6 ?
Help I need help with this problem 100 points 100^5+10^2 equal what.
Respond to a text i miss you but i can't make u happy
Use the graph to help 1. M(2, 1), N(5, 3), and O(-2, 4) are the coordinates of a triangle's vertices. If the triangle is translated left 7 units, what are the c
0.05194 rounded to the nearest tenth
One regiment marched off to battle wearing ___________, the traditional army wear for Scottish regiments, because it was all they had