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

its Human Relations which of these statements is true? A. a good attitude happens by accident B. being in conflict with people isn't much of a problem C. a g
The movement known as the Enlightenment focused on the idea that A. people needed to make a return to the natural world. B. faith in God could sol
Which of the following was not a cause of the fi nancial crash of 1857? (A) Infl ux of gold from the California Gold Rush (B) Overproduction of grain (C) Land a
I need help with this please... Fast....
what is the syntax of sinX????
Write the number that is ten million more than 842,369,167
Sandy has 16 roses,8 daisies,and 32 tulips.She wants to arrange all the flowers in bouguets.Each bouguet has the same number of flowers and the same type of flo
What is a Binary Compound? Is it related to the Ionic and Molecular compounds? if so, how so?
As a respectable Victorian, Barrett Browning does not describe her love as — a. a replacement for her lost religious belief b. the equivalent of a search for ju
Anna Bradstreet plans with generally influenced by which aspects of her upbringing