30.12.20

c program to print the largest of two given numbers

#include<stdio.h>

int main()

{

int a,b;

printf("Enter two values);

scanf("%d%d",&a,&b);

if(a>b)

{

printf("%d is largest number",a);

}

else

{

printf("%d is largest number ",b);

}

return 0;

}

OUTPUT:

Enter two value 20 60

60 is largest number 

No comments:

Post a Comment

JAVA program pattern 2

import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...