Computer Science, asked by pathakshobha300033, 11 months ago

write a program in c++ that print the largest of two numbers entered from the keyboard. pass the two numbers to a function as argument, find the largest and return this value to a main function.

Answers

Answered by devansh26oct2004
8

Answer:

YOUR ANSWER IS HERE

AND

OUTPUT IS IN THE ATTACHMENT

Explanation:

#include <iostream>

#include <iostream>using namespace std;

#include <iostream>using namespace std;int main()

#include <iostream>using namespace std;int main(){

#include <iostream>using namespace std;int main(){ int num1, num2;

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:";

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1;

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:";

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:"; cin>>num2;

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:"; cin>>num2; if(num1>num2)

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:"; cin>>num2; if(num1>num2) { cout<<"First number "<<num1<<" is the largest"; }

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:"; cin>>num2; if(num1>num2) { cout<<"First number "<<num1<<" is the largest"; } else

#include <iostream>using namespace std;int main(){ int num1, num2; cout<<"Enter first number:"; cin>>num1; cout<<"Enter second number:"; cin>>num2; if(num1>num2) { cout<<"First number "<<num1<<" is the largest"; } else {cout<<"Second number "<<num2<<" is the largest"; }

largest"; } return 0;}

Attachments:
Similar questions