Monday, 8 July 2013

Program to print Addition, Subtraction, Multiplication and Division of two numbers

#include <stdio.h>
void main()
{
int a,b,c,d,e,f;
clrscr ();
printf("Enter the two number");
scanf("%d%d",&a,&b);
c= a+b;
d= a-b;
e= a*b;
f= a/b;
printf("\n\t%d\n\t%d\n\t%d\n\t%d",c,d,e,f);
getch();

}

Program to print and calculate sum of 5 numbers

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,d,e,Sum;
clrscr();
printf("Enter the five numbers");
scanf("%d%d%d%d%d",&a,&b);
Sum=a+b+c+d+e;
printf("%d",Sum);
getch();

}

Program to display name without using printf

#include<stdio.h>
void main()
{
clrscr();
puts("Innovators With C");
getch();

}