We can execute Addition,Subtraction,Multiplication and Division operation using Turbo C programmes. We can Add, Subtract, Multiply and Divide numbers in two different ways - choose numbers from keyboard or assign values with variables.
Here is a simple programme for adding two numbers assign values with variables.
INPUT
#include<stdio.h> /* Using library function */
#include<conio.h> /* Using library function to support printf( ) function */
void main() /* Using void main( ) function */
{
clrscr(); /* To clear the screen */
int a, b, c; /* Using integer type values */
a=10; /* Assign the value 10 with variable a */
b=5; /* Assign the value 5 with variable b */
c=a+b; /* Generate Addition operation */
printf("The Summation of the numbers is:",c); /* To print the text */
getch(); /* To show output on the screen */
return 0; /*Return null value */
}
OUTPUT
The Summation of the numbers is: 15
Here is a simple programme for adding two numbers assign values with variables.
INPUT
#include<stdio.h> /* Using library function */
#include<conio.h> /* Using library function to support printf( ) function */
void main() /* Using void main( ) function */
{
clrscr(); /* To clear the screen */
int a, b, c; /* Using integer type values */
a=10; /* Assign the value 10 with variable a */
b=5; /* Assign the value 5 with variable b */
c=a+b; /* Generate Addition operation */
printf("The Summation of the numbers is:",c); /* To print the text */
getch(); /* To show output on the screen */
return 0; /*Return null value */
}
OUTPUT
The Summation of the numbers is: 15