skip to main
|
skip to sidebar
Pages
Home
C
C++
Java
Embedded Systems
Notepad
Zealous Coders
Coding is our life.....
Wednesday, June 27, 2012
To find factorial
#include<stdio.h>
#include<conio.h>
int main(void)
{
int i,num;
int res=1;
printf("Enter Number : \t");
scanf("%d",&num);
for(i=num; i>1; i--)
{
res*=i;
}
printf("\n\nFactorial of %d is : %d",num,res);
getch();
return 0;
}
0 comments:
Post a Comment
Newer Post
Older Post
Home
Labels
Basics of Programming
(1)
C - Array
(2)
C - Basic Programs
(7)
C - For loop
(4)
C - If-else statement
(4)
C - Recursion
(1)
C Programming
(6)
C++ - Basic Programs
(7)
C++ - For loop
(3)
C++ - If Else Statement
(4)
Embedded Systems - LED Programs
(11)
Embedded Systems - Seven Segment
(2)
Embedded Systems Circuit
(4)
Java - Basic Programs
(4)
Programming using Notepad
(2)
Blog Archive
►
2013
(1)
►
February
(1)
▼
2012
(52)
►
October
(30)
►
July
(2)
▼
June
(20)
To Enter values in integer array
To Enter a string
To print a message in textmode
To print table of a number
Alternate way to get integer at run time without u...
To add two numbers - Run Time
To add two numbers - Compile Time
To print message on console in JAVA
To Print first 100 even numbers
To find factorial
To print first 100 odd numbers
To print first 100 natural numbers
To add two numbers
To multiply two numbers
Greater number among two variables
Swap number using two variables using arithmetic o...
Swap number using two variable using bit-wise oper...
Swap number using three variables
To familiar with various data types in C
To print a message
Followers
Powered by
Blogger
.
Popular Posts
C++ - Swap number using two variable using bit-wise operators
#include<iostream.h> #include<conio.h> int main(void) { int x,y,z; cout<<"\nEnter First Number : "; ci...
How to see a code of a program without using a dedicated software
From last two days, We got some queries about how to know the coding of a program as they dont have the software installed for the same rig...
To print table of a number
#include<stdio.h> #include<conio.h> int main(void) { long num, product, i; clrscr(); printf("\n\nEnter Numb...
LED Left Shift Increment
Refer 'LED Basic Circuit' in 'Embedded Systems Circuits' Label #include<reg51.h> #include<intrins.h> vo...
To multiply two numbers
#include<stdio.h> #include<conio.h> int main(void) { int x; int y; int res; printf("Enter X : "); ...
LED Sand Tough Pattern
Refer 'LED Basic Circuit' in 'Embedded Systems Circuits' Label #include<reg51.h> #include<intrins.h> vo...
Programming with Notepad - To create warning message
1. Open Notepad 2. Copy and paste the following code @echo off msg * Welcome to Zealous Coders. Do you want to Continue? msg * ...
LED Sand Glass Pattern
Refer 'LED Basic Circuit' in 'Embedded Systems Circuits' Label #include<reg51.h> #include<intrins.h> voi...
C++ - Greatest number among two variables
#include<iostream.h> #include<conio.h> int main(void) { int x,y,z; cout<<"\nEnter First Number : "; ci...
To distinguish whether the number is alphabet, number or special character
#include<stdio.h> #include<conio.h> int main(void) { unsigned char a; printf("Enter Character : "); ...
0 comments:
Post a Comment