Before going back to more of theory let us try out a few more simple C programs, like finding the bigger of two numbers or smaller of two numbers etc ....
Here is the program
Here is the program
#include<stdio.h> #include<conio.h> void main() { int a,b; clrscr(); printf("enter two numbers"); scanf("%d%d",&a,&b); if(a>b) printf("%d is greater than %d",a,b); else printf("%d is greater than %d",b,a); getch();
}
This program finds the bigger of the two numbers that have been input by the user.
No comments:
Post a Comment