Write a C program using a function without argument and return type
#include <stdio.h>
#include<conio.h> void greatnum(); void main() { greatnum(); return 0; } void greatnum() { int a,b; clrscr(); printf("enter the two numbers of a and b \n"); scanf("%d%d",&a,&b); if(a>b) printf("the greatest number is %d",a); else printf ("the greatest number is %d",b); getch(); }
OUTPUT :
enter the two numbers of a and b 10 20 the greatest number is 20 Process finished.
No comments:
Post a Comment