Friday, 24 June 2016

program to add two number

hello guys today i m gonna show u a basic program to add to no....
so there are five airthematic operator in c/c++

  • + addition
  • - substraction
  • * multiplication
  • / division
  • % mod/remainder
here is an illustration to build a basic program to add to no :-

#include<stdio.h>
void main()
{
int a,b;
scanf("%d %d",&a,&b);   //inputing two no from the user
printf("\n addition = %d",a+b);
}

so this way we can add subs or perform any mathematical operation ....
we can also use 3 variable to perform same action by writing

c=a+b;
printf("addition=%d",&c);


Location: India

Related Posts:

  • stdio.h????? hello guys, today i am gonna tell you about most used header file which is <stdio.h>.. here is our basic program we are gonna study all of… Read More
  • IDE.....!!!! HELLO  guys , today i am gonna show you guys how to install IDE  of C langugae... SO  guys what is an IDE ? well guys ,IDE stands … Read More
  • escape sequences (part-2) hello guys today, i m gonna  about remaining escape sequences:: \r = carry return character  so how it works?? /r will return curs… Read More
  • conio Hello guys, today i am gonna tell you about the header file which is <conio.h>.. here is our basic program we are gonna study all of … Read More
  • BASIC C program hello guys , today we are gonna start with our 1st program in C language....we are gonna learn this program in small small parts cause this is yo… Read More

0 comments:

Post a Comment