#include |
basically this is a a my own blog to help ma students and friends with sharing useful information with the. information regarding C language code. .net applications, .net projects. general technical information. notes.
Showing posts with label C Programs. Show all posts
Showing posts with label C Programs. Show all posts
Saturday, 14 January 2012
Program for Leap year Checking
Write a Program to check an integer for perfect square
#include |
Conversion of Centigrade temperature to fahrenheit
#include |
Write a Program to Convert KiloMeter into Meter,Centimeter,Inch
#include |
Tuesday, 22 November 2011
Interchange Values of Two numbers Without using third variable
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Earn upto Rs. 9,000 pm checking Emails. Join now!
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter First number=");
scanf("%d",&a);
printf("Enter Second number=");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is=%d\n",a);
printf("b is=%d",b);
getch();
}
Interchange Values of Two numbers
| #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter First number="); scanf("%d",&a); printf("Enter Second number="); scanf("%d",&b); c=a; a=b; b=c; printf("a is=%d\n",a); printf("b is=%d",b); getch(); } Earn upto Rs. 9,000 pm checking Emails. Join now! |
Monday, 21 November 2011
Write a Program to calculate area of a Rectangle
| #include<conio.h> #include<stdio.h> void main() { int length,breadth,area_of_rectangle; clrscr(); printf("Enter the Length="); scanf("%d",&length); printf("Enter the Breadth="); scanf("%d",&breadth); area_of_rectangle=length*breadth; printf("Area of rectnagle is=%d",area_of_rectangle); getch(); } |
Write a Program to calculate area of a circle
| #include<conio.h> #include<stdio.h> void main() { double radius,area_of_circle; clrscr(); printf("Enter the radius="); scanf("%lf",&radius); area_of_circle=3.14*radius*radius; printf("Area of Circle is=%lf",area_of_circle); getch(); } |
Sunday, 13 November 2011
If a five-digit number is input through the keyboard,write a program to reverse the number?
/*Reverse a Number*/
#include<stdio.h>
#include<conio.h>
void main()
{
int number,reverse_number;
clrscr();
printf("Enter the Number you want to reverse:");
scanf("%d",&number);
/*we use while loop and '%' to seprate a number*/
printf("Reverse number is:");
while(number>0)
{
reverse_number=number%10;
number=number/10;//update number
printf("%d",reverse_number);
}
getch();
} |
If a five-digit number is input through the keyboard ,write a program to calculate the sum of its digit?
/*Sum of Digit of a Number*/ #include |
Subscribe to:
Posts (Atom)