how to get the sum of two integers?
Answers were Sorted based on User's Feedback
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sum;
printf("enter two numbers");
scanf("%d%d",&i,&j);
sum=i+j;
printf("sum=%d",sum);
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sandeep gupta
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sum;
printf("enter two numbers");
scanf("%d%d",&i,&j);
sum=i+j;
printf("sum=%d",sum);
getch();
}
getch is missed which hold the output result on the screen.that's why i add the GETCH in this program.
| Is This Answer Correct ? | 0 Yes | 0 No |
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What two types of containers does the stl provide?
Is stl part of c++ standard?
What are the various types of stl containers?
Name the different types of stl containers.
Define the terms: field, record, table and database
How to write a function that goes through an array of characters and eliminates any elements that are not letters (Legal letters can be either in an uppercase or a lowercase format.) The function removeNonLetters should return the new effective size of the array as the result.
write a program to convert a decimal number in to its equivalent binary number?
how to use C++?
Can we use stl in coding interviews?
what is use of for loop?
wap in c++ which accept a integer array and its size as argument and replaces element having even values with its half and element having odd values with twice its value