#include<stdio.h> #include<conio.h> #include<dos.h> main() { int a[9],i,j,k,l=1,large=0,small=a[0],b; int f=1,d,z,c,v,x,n,t,y,u,o,p; clrscr(); printf("please wait.......\n"); for(u=0;u<1;u++) { delay(5000); //delay for enter 10 number printf("\t\t\t\ENTER 10 NUMBER\n"); } //printf("\t\t\tenter 2 number\n"); for(i=0;i<9;i++) { printf("\n\Enter %d number",i); scanf("%d",&a[i]); } printf("please wait....\n"); for(t=0;t<1;t++) { delay(1000); //delay for external number printf("enter a external number\n"); //external number scanf("%d\n",&k); } for(i=0;i<9;i++) { if(a[i]>large) //large large=a[i]; if(a[i]<small) //small small=a[i]; j=large+small; //addition of large and small if(a[i]==k) printf("\nsuccess\n"); //success if(a[i!=k]) printf("\nunsuccess\n"); //unsuccess } printf("THE GIVEN NUMBER IS\n"); if(j%2==0) printf("even number\n"); //even number else printf("odd number\n"); //odd number printf("===========================================\n"); if(j>0) printf("positive number\n"); //positibe number else printf("negative number\n"); // negative number printf("===========================================\n"); for(b=1;b<=j;b++) { //factorial f=f*b; } for(z=0;z<1;z++) { delay(2000); //delay for lrage and small printf("\t\t\tlargest number is %d\n",large); //print large printf("\t\t\tsmallest number is %d\n",small); //print small //delay(1000); } for(x=0;x<1;x++) { delay(1000); //delay for line printf("===========================================\n"); } for(c=0;c<1;c++) { delay(1000); //delay for addition printf("addition of LARGE and SMALL NUMBER [%d][%d]\nanswer is %d\n",large,small,j); printf("============================================\n"); } for(v=0;v<1;v++) { //delay for factorial delay(1000); printf("FACTORIAL OF NUNBER IS %d",f); } for(d=0;d<2;d++) { delay(100); //delay for what is this printf("\nwhat is this........\n"); delay(1000); } for(y=0;y<1;y++) { delay(1000); printf("rhythm correct\n"); //rhythm correct } for(n=0;n<2;n++) { delay(1000); //delay for end of process printf("end of process\t\t\t"); } printf("\n\a\a\a\a PRESS ENTER"); getch(); return 0; }
Sunday, 8 January 2012
linear serach with large and small,addition,factorial
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment