|
|
|
|
|
| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 4 Jun 2008 18:49:57 IST
|
|
|
c program for finding factorial.....give an idea plzzzz
|
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 4 Jun 2008 18:53:11 IST
|
|
|
any one here learning or completed C
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 4 Jun 2008 19:14:49 IST
|
|
|
int x = 1 for ( i = n , i >1 , i--) { x = x * i ; }
cout << x
|
this reply: 5 points
(with 1 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 4 Jun 2008 19:19:05 IST
|
|
|
#include <stdio.h>
void main()
{ int i,j,n;
printf("enter a number"); scanf("%d",&n); j=1;
for (i=1; i<=n; i++)
j=j*i;
printf("The factorial of %d is %d\n",n,j);
}
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 4 Jun 2008 19:20:59 IST
|
|
|
i think u hav given for c++..........but i got the idea frm that....thanx
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
|
|
|
|
|
|
|