April 18, 2015

Homework Help: Programming C++

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

int first_value;
int second_value;

long result;
print f("enter your first value:);
printf("enter your second value:);
printf("the sum of two values is %d",result);

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:

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...