Earn by twitter on twivert

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

Sunday, December 27, 2009

WAP to Find Large Number in C

/*large number*/
#include
#include
void main()
{
int a,b;
clrscr();
printf("e 2 no.");
scanf("%d%d",&a,&b);

if(a>b)
printf("a is larg.=%d",a);
else
printf("b is larg.=%d",b);
getch();
}

WAP to use switch control in C

/*switch control*/
#include
#include
void main()
{
int choice,sum,sub,multi,div,rem,a,b,y;
clrscr();
n:printf("enter ur choice\n1. sum\n2. sub\n3.multi\n4.div\n5.rem\n6. stop");
scanf("%d",&choice);
p:switch(choice)
{
case 1:printf("\ne.two no.");
scanf("%d%d",&a,&b);
sum=a+b;
printf("%d",sum);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 2:printf("\ne.two no.");
scanf("%d%d",&a,&b);
sub=a-b;
printf("%d",sub);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 3:printf("\ne.two no.");
scanf("%d%d",&a,&b);
multi=a*b;
printf("%d",multi);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 4:printf("\ne.two no.");
scanf("%d%d",&a,&b);
div=a/b;
printf("%d",div);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 5:printf("\ne.two no.");
scanf("%d%d",&a,&b);
rem=a%b;
printf("%d",rem);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 6:printf("\nbye");
}
getch();
}

WAP to find Even or Odd number

/*Even/odd number*/
#include
#include
void main()
{
int a;
clrscr();
printf("Enter number");
scanf("%d",&a);
if(a%2==0)
{
printf("enter no. %d is even",a);
}
else
printf("enter no. %d is odd",a);
getch();
}

arithmetic oprations in C

/*arithmetic oprations*/
#include
#include
void main()
{
int a,b,add,sub,multi,div,rem;
clrscr();
printf("Enter Two number"); //This is used to display massege.
scanf("%d%d",&a,&b); //This is used to take value by user.

add=a+b;
sub=a-b;
multi=a*b;
div=a/b;
rem=a%b;
// display of value of variable.
printf("Addition is %d",add);

printf("substrction is %d",sub);
printf("Multiplication is %d",multi);
printf("dividetion is %d",div);
printf("remaining is %d",rem);
getch();
}

display value of variable in C

/*display value of variable*/
#include
#include
void main()
{
int a;
clrscr();
printf("Enter any number"); //This is used to display massege.
scanf("%d",&a); //This is used to take value by user.
printf("value of a is %d",a);
//This is used to display value of variable.
getch();
}

simple print program in C

/*simple print program*/
#include
#include
void main()
{
clrscr();
printf("My first prog."); //This is used to display massege.
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