Professional Documents
Culture Documents
Program 1.1
Program 1.1
1
Write a program to accept integers and print the largest of the three. Make use of only if statement.
#include<iostream.h>
int main()
int x,y,z,max;
cin>>x>>y>>z;
max=x;
if(y>max)
max=y;
if(z>max)
max=z;
<<y<<”and”<<z<<”is”<<max;
return 0;