write a program to accept two no and display their greatest
Answers
Answered by
1
#include<studio.h>
void main()
{
int a,b;
printf("Enter the two numbers");
scanf("%d %d" , &a &b);
if(a>b)
printf(" the greatest is %d",a);
else
printf("the greatest is %d",b);
}
This is C code
void main()
{
int a,b;
printf("Enter the two numbers");
scanf("%d %d" , &a &b);
if(a>b)
printf(" the greatest is %d",a);
else
printf("the greatest is %d",b);
}
This is C code
pappu82:
hmmm
Answered by
1
import java.util.scanner
public class java program
{
public static void main ( string args [])
{
int a,b,big;
scanner scan=new scanner ( System.in);
System.out.print("Enter two number:");
a=scan.nextInt()
b=scan.nextInt ()
if (a>b)
{
big=a;
}
else
{
big=b;
}
System.out.println ( "Largest of two number is "+big);
}
}
public class java program
{
public static void main ( string args [])
{
int a,b,big;
scanner scan=new scanner ( System.in);
System.out.print("Enter two number:");
a=scan.nextInt()
b=scan.nextInt ()
if (a>b)
{
big=a;
}
else
{
big=b;
}
System.out.println ( "Largest of two number is "+big);
}
}
Similar questions