answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

int main(void)

{

int sum=0,n,i;

clrscr();

printf("\n Enter two no.");

scanf("%d%d",&n,&i);

sum=n+i;

printf("\n%d+%d=%d,n,i,sum);

getch();

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include

#include

void main()

{

int a,b,c;

clrscr();

printf("enter a ,b values:");

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

printf("the addition of two no is:",c);

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

//write a program for subtraction of 2 numbers.

#include

main()

{

int a,b,d;

printf("enter 2 numbers :");

scanf("%d%d",&a&b);

d=a-b;

printf("subtraction of 2 numbers=%d",d);

}

output(example)-

enter 2 numbers : 3 2

subtraction of 2 numbers : 1

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

#include<stdio.h>

#include<conio.>

void main()

{

int a,b,sum;

clrscr();

cin<<"enter value of a";

cout>>a;

cin<<"enter value of b";

cout<<b;

sum=a+b;

cout<<"sum of two numbers="

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

//program to add two numbers

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr(): //its prototype or header file is conio.h

printf("\n enter first number :"); //its prototype or header file is stdio.h

scanf("%d",&a); //its prototype or header file is stdio.h

printf("\n enter second number :"); //its prototype or header file is stdio.h

scanf("%d",&b); //its prototype or header file is stdio.h

c=a+b;

printf("\n the sum of two numbers is :%d",c); //its prototype or header file is stdio.h

getch(); //its prototype or header file is conio.h

}

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Just declare, initialize, and subtract...

double a = 1.23456789;

double b = 2.34567890;

double c;

c = a-b;

This answer is:
User Avatar
User Avatar

Yazie Bekalu

Lvl 1
1y ago
Tank you

User Avatar

Wiki User

15y ago

Use ~ Ones complement operator and add one.

10 - 3 = 7

10 + ~3 + 1 = 7

GP>

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

int num0 = 0;

int num1 = 1;

int num2 = num1 - num0;

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

wap to subtract two variables

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in c language to subtract two numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write an assembly language program to multiply two BCD numbers?

fish


How do you write the average n numbers program in c language?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you. no i am asking to verify my answer


Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


Write a program to subtract integer y from integer x?

x -=y;


Write a program in C language to multiply any two numbers without using in source code?

The question is malformed and incomprehensible.


Write Client and server program in C language using UDP?

Write and run a client and a server program in C-language using UDP


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


How do you Write a program in 'c' language which accepts int numbers from the users print its reverse number x function which return value?

question clarity


Can you write program by c language in dos?

Yes.


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


Example of Password program code in assembly language?

How to write the program un Assembly language to set a password for personal computers?