/*WAP to calculat factorial using "for loop" */
#include<stdio.h> #include<conio.h> void main() { int fact=1,n,i; clrscr(); printf("enter number"); scanf("%d",&n); for(i=1;i<=n;i++) fact=fact*i; { printf("%d",fact); getch(); } }
there is some good c ,java, sql and vb6 programs,Windows tricks, sms shorthand etc
#include<stdio.h> #include<conio.h> void main() { int fact=1,n,i; clrscr(); printf("enter number"); scanf("%d",&n); for(i=1;i<=n;i++) fact=fact*i; { printf("%d",fact); getch(); } }
No comments:
Post a Comment