Thursday
December 18, 2014

Homework Help: Programming C++

Posted by Maryam on Tuesday, April 20, 2010 at 9:26am.

#include<stdio.h>
#include<conio.H>
{
clrscr();
int first_value;
int second_value;

long result;
print f("enter your first value:);
scanf("%d",&first_value);
printf("enter your second value:);
scanf("%d",&second_value:);
result=first_value+second_value;
printf("the sum of two values is %d",result);
}

PROBLEM:
Let first value = 1600 second value = 1700
these values comes under the integer data their sum i.e. 3300 can't be accumulated under inter data type so long data type is used for the third variable that is result.
but the output is faulty, their is no solid for this behaviour please tell me any reason you can propose.
reply as soon as possible as i need it urgently.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

C Programming - I am trying to find the sum of two integers. I entered the ...
C programming - Enter two integers between 1 to 10 3 4 Both numbers are less ...
Computer - on C++, I want to make an operation like " 2x + y - z ", I wrote ...
C programming - Question: Write a program that reads integers from the keyboard ...
C programming - A few questions, all involving "for" loops that I am unsure how ...
C Programming - Write a C program that accepts sales made by 5 sales reps for ...
c++ program - will this work for a source code that receive and total collection...
c++ program - how can a modfiy this source code to a menu. #include <stdio.h&...
computer sciece - #include <stdio.h> #include <stdlib.h> int main...
C Programming - Okay, question. What if I inputted this: Enter a temperature: 32...

Search
Members