I am give you algorithm to find the factorial of given no. Try your self.
1. Intialize variable no,fact=1,ans
2. Get value of no from user.
3. Do while(no>=fact)
4. Take answer in ans variable
5. Display ans

{snip}

Edited 6 Years Ago by WaltP: Fake signature snipped

I am give you algorithm to find the factorial of given no. Try your self.
1. Intialize variable no,fact=1,ans
2. Get value of no from user.
3. Do while(no>=fact)
4. Take answer in ans variable
5. Display ans

huh?? what does this most incoherent mess of pseudo-code mean? this is garbage.

Ok I can't give you the answer, but here is what a programming instructor once told me:

"Inside the loop, you multiply the counter times the accumulated number up to that point (the accumulator has to be initialized to 1 before the loop). So if the user enters a 3--The first time through the loop, the counter is 1, so 1 * the accumulator 1 is 1. Second time through the loop, the counter is 2, so 2 * the accumulator 1 is 2. Third time through the loop, the counter is 3, so 3 * the accumulator 2 is 6. This is where the loop ends, and after the loop, 6 would be displayed as the answer."

huh?? what does this most incoherent mess of pseudo-code mean? this is garbage.

in easy words we can simply write the algorithm as:
1.set a variable to be 1
2.scan the no from user for which he needs the factorial.
3.inside the loop
a. set the loop to run n-1 times where n is the no inputted by user
b.then start multiplying the variable which was declared as 1 with the one used in loop.
4.show the result.

its so simple try it .i can understand your problem as i was also stuck in a problem like this few weeks ago. hope you understand all this written above.

#include<stdio.h>
void main()
{
int fact=1,no,i=1;
printf("Enter no whose factorial is to be found/n");
scanf("%d",&no);
do
{
fact*=i;
i++;
}while(i<=no);
printf("Factorial of %d=%d\n",no,fact;
}

write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Bank balance
-Amount invested in business
-Amount given to other business partners as loan
and
-Amount payable to others

I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...

there are five tables (personTb, addressTb,churchTb) each holds data pertinent to an individual; (personAddress,personChurch) each hold the primary key for the person table and corresponding table IE personAddress holds primary key for addressTb.

both snippets work, my question is; Is my join correctly formatted?