Tuesday, 17 November 2020

C++ Program to find the largest number out of 3 numbers entered by the user.

#include <iostream>

using namespace std;

int main() 

{

int N1,N2,N3;

cout<<"Enter 3 Numbers"<<endl;

cin>>N1>>N2>>N3;

if(N1>N2&&N1>N3)

cout<<N1<<" is the Greatest Number";

else if(N2>N1&&N2>N3)

cout<<N2<<" is the Greatest Number";

else 

cout<<N3<<" is the Greatest Number";

}


No comments:

Post a Comment

Java Program to count the total number of characters in a string

 //Java Program to count the total number of characters in a string import java.util.*; public class CountChars {     public static void mai...