Showing posts with label precautions. Show all posts
Showing posts with label precautions. Show all posts

January 20, 2013

Simple C-programs


/*Program to enter two numbers by user and perform addition and multiplication operations*/

#include<stdio.h>
#include<conio.h>
void main()
{
     int n1,n2,sum=0,mul=0 ;
     printf("\n enter any two numbers");
     scanf("%d%d",&n1,&n2);
     sum=n1+n2;
     mul=n1*n2;
     printf("\n sum of two numbers is %d",sum);
     printf("\n multiplication of two numbers is %d",mul);
     getch();
     }
output of sum and multiplication of two numbers