Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Sunday, April 18, 2010

WAP to check leap year


/*WAP to check leap year*/

#include<stdio.h>
#include<conio.h>
void main()
{
 int a;
 clrscr();
 printf("enter year");
 scanf("%d",&a);
 if(a%4==0)
 printf("year is leap");
 else
 printf("year is'not leap");

 getch();
 }

WAP to check enter character is Alphabat,digits or any special char.


/*WAP to check enter character is Alphabat,digits or any special char.*/

#include<stdio.h>
#include<conio.h>
void main()
{
 char any;
 clrscr();
 printf("enter any character");
 scanf("%c", &any);
 if(any>=48&&any<=57)
 {
 printf("it is digit");
 }
 else
 if(any>=97&&any<=122)
 {
 printf("it is lowercase alphabat");
 }
 else
 if(any>=65&&any<=90)
 {
 printf("it is upper case alphabat");
 }
 else
 if(any>=32&&any<=47)
 {
 printf("it is special symbol");
 }
 else
 if(any>=58&&any<=64)
 {
 printf("it is special symbol");
 }
 else
 if(any>=91&&any<=96)
 {
 printf("it is special symbol");
 }
 else
 if(any>=123&&any<=127)
 {
 printf("it is special symbol");
 }
getch();
}

Thursday, April 15, 2010

WAP to calculat factorial using "for loop"


/*WAP to calculat factorial using "for loop" */

#include<stdio.h>
#include<conio.h>
void main()
{
int fact=1,n,i;
clrscr();
printf("enter number");
scanf("%d",&n);
for(i=1;i<=n;i++)
fact=fact*i;
{
printf("%d",fact);
getch();
}
}

WAP to calculat factorial using "WHILE" loop


/*WAP to calculat factorial using "WHILE" loop"*/

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=1,fact=1;
clrscr();
printf("enter no.");
scanf("%d",&n);
while(i<=n)
{
fact=fact*i;
i++;
}
printf("%d",fact);
getch();
}

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share