Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Class 11
→
Accounts in Class 11
→
Write a programme to find factorial of a given num...
1.
Write a programme to find factorial of a given number using for loop
Answer» \t#include
\tint\xa0main() \t{ \t\xa0int\xa0i,fact=1,number; \t\xa0printf("Enter\xa0a\xa0number:\xa0"); \t scanf("%d",&number); \t\xa0for(i=1;i<=number;i++){ \t\xa0fact=fact*i; \t } \t\xa0printf("Factorial\xa0of\xa0%d\xa0is:\xa0%d",number,fact); \treturn\xa00; \t}
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Input n and print n^2,n^3,n^4
What are String literals?
About halfyearly
What are implicit type conversion
Find out the error in folowing1. Temperature = 90 print temperature
Advantages of python
Storage of i kb means the following number of bytes1) 1000 , 2) 1024 , 3) 964
WAP to print prime numbers between two given numbers.
List the name of two components of cpu
What is the task of presentation software?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies