Monday, January 4, 2010

Program to show swap of two no’s without using third variable.


#include
#include

void main()
{
int a,b;
clrscr();
printf("enter value for a & b: ");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("after swapping the value of a & b: %d %d",a,b);
getch();
}

Program to calculate sum of 5 subjects & find percentage.


#include
#include

void main()
{
int s1,s2,s3,s4,s5,sum,total=500;
float per;
clrscr();
printf("enter marks of 5 subjects: ");
scanf("%d%d%d%d%d",&s1,&s2,&s3,&s4,&s5);
sum=s1+s2+s3+s4+s5;
printf("sum=%d",sum);
per=(sum*100)/total;
printf("percentage=%f",per);
getch();
}

Program to convert temperature from degree centigrade to Fahrenheit:

#include
#include

void main()
{
float c,f;
clrscr();
printf("enter temp in centigrade: ");
scanf("%f",&c);
f=(1.8*c)+32;
printf("temp in Fahrenheit=%f",f);
getch();
}

 

Program to find the simple interest:

#include
#include

void main()
{
int p,r,t,si;
clrscr();
printf("enter principle, Rate of interest & time to find simple interest: ");
scanf("%d%d%d",&p,&r,&t);
si=(p*r*t)/100;
printf("simple intrest= %d",si);
getch();
}

Program to find area and circumference of circle.


#include
#include

void main()
{
int r;
float pi=3.14,area,ci;
clrscr();
printf("enter radius of circle: ");
scanf("%d",&r);
area=pi*r*r;
printf("area of circle=%f",area);
ci=2*pi*r;
printf("circumference=%f",ci);
getch();
}

Program to find sum of two number

#include
#include

void main()
{
int a,b,s;
clrscr();
printf("Enter two no: ");
scanf("%d%d",&a,&b);
s=a+b;
printf("sum=%d",s);
getch();
}

 

Friday, January 1, 2010

Mr.Atal Bihari Vajpayeev Vs Number 13




Name: Atal Bihari Vajpayee
Birth Date:
25 December 1924
Birthplace: Gwalior, MP
Occupation: Prime Minister
Born In: Madhya Pradesh

*)  April 13, Prime Minister Atal Bihari Vajpayee will leave for Lucknow to file his nomination papers. 


*)  The date was chosen because 13 is a lucky number for him.


*)  He was sworn in on a 13th and successfully led the 13th Lok Sabha.


*)  That he was able to remain in the saddle for 13 days even when he did not enjoy majority support is also cited in this context.


*)  Since the counting of votes is, again, on a 13th (May), the BJP believes nothing will prevent Vajpayee from returning to South Block.