hello guys
i have some questions and i want you to help me
1- how to find a factorial for a number
e.g. input 5 = 5x4x3x2x1 so the is output 120, now please see my code
int fac = 0 ;
int count = 0;
int num;
cout <<"Please enter a number:";
cin >> num;
while(count < num){
cout << num << " * ";
fac = num * num;
num--;
count++;
}
cout <<",The factorial is " << fac;
:(
* * * * *
2- Draw a flowchart to calculate the value of sin(x):
http://www.daniweb.com/forums/attachment.php?attachmentid=15636&stc=1&d=1277989751
i don't know how to start with this question, is there any special function for it or what?
* * * * *
3- display all the prime numbers below a given number.
e.g. Given 23 then the result should be2 3 5 7 11 13 17 19
this is also i find it deficult for me :( , how can i do this programme?
* * * * *
that's all, waiting for you