28 Sep 2010 @ 11:26 PM 

Time

Posted By: EzoecIsoc
Last Edit: 28 Sep 2010 @ 11:27 PM

EmailPermalinkComments Off
Tags
Categories: Uncategorized
 01 Feb 2010 @ 9:50 PM 

A C program for finding a Factorial of user entered number.

How to copy the code in your notepad

In order to copy this code move your cursor to upper right corner of the post a source button will appear click on it and copy the code.

#include<stdio.h>
#include<conio.h>
void main() {
 int i,n,ans;
 clrscr();
 printf("\n  Enter the number: ");
 scanf("%d",&n);
 ans=1;
 for (i=n;i>=1;i--) {
 ans=ans*i;
 }
 printf("\n  The factorial of this number is %d",ans);
 printf("\n\n   Press any key to exit the program...");
 getch();
}
Posted By: EzoecIsoc
Last Edit: 01 Feb 2010 @ 10:15 PM

EmailPermalinkView Comments
Tags
 01 Feb 2010 @ 8:50 PM 

A C program for arranging elements of user entered array in ascending or descending order and finding minimum and maximum value among all.

How to copy the code in your notepad

In order to copy this code move your cursor to upper right corner of the post a source button will appear click on it and copy the code.

#include<stdio.h>
 #include<conio.h>
 void main() {
 int n[10],i,j,t,max,min;
 clrscr();
 for (i=0;i<10;i++) {
 printf("\n   Enter the %d number: ",i+1);
 scanf("%d",&n[i]);
 }
 for (i=0;i<20;i++) {
 for (j=i+1;j<10;j++) {
 t=n[i];
 if (n[i]>n[j]) {
 n[i]=n[j];
 n[j]=t;
 }
 }
 }
 max=n[0];
 min=n[0];
 for (i=0;i<20;i++) {
 if (max<n[i])
 max=n[i];
 if (min>n[i])
 min=n[i];
 }
 printf("\n   The sorted array is as follow: \n");
 for (i=0;i<5;i++) {
 printf("%d\n",n[i]);
 }
 printf("\n   The max value in the array is: %d",max);
 printf("\n   The min value in the array is: %d",min);
 getch();
 printf("\n\n\n   Copyright {EZOEC ISOC}");
 printf("\n\n   Press any key to exit the program...");
 getch();
 }
Posted By: EzoecIsoc
Last Edit: 01 Feb 2010 @ 10:27 PM

EmailPermalinkView Comments
Tags

 Last 50 Posts
Change Theme...
  • Users » 2
  • Posts/Pages » 5
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Welcome



    No Child Pages.

Blog



    No Child Pages.