65 842
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #15460 in C++ for Joe Washington

Question #15460
Write a program that reads in two integers and prints which value is larger
Expert's answer
#include<iostream.h>

int q, p;
void main(){
cout<<"Enter the first integer: ";
cin>>q;
cout<<"Enter the secondt integer: ";
cin>>p;
if (p>q) cout<<"The second integer is larger.\n";
if (p<q) cout<<"The first integer is larger.\n";
if (p==q) cout<<"The given integers are equal.\n";
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions