writing program that read 4 integers from a file.

anyone can help me in solving this question please .

Write a program that reads four integers from a file ‘input.txt’.

The program will then create a single integer number from the four integers. The

output of

the program will be the single number and single number + 600.

are there any steps i forgot them ?

#include <iostream>
using namespace std;
int main ()
{
int number , a;
cout<<"enter en ineger number";
cin>>number;
cout<<"add 600 to the number"
cin>>a=number+600;
return 0;
}
baraa dandachi wrote:
cin>>a=number+600;
What are you trying to do here?
to calculate (a) which is the total number (number + 600) ..

if there are any mistakes please tell me the correct steps .



Why do you have "cin>>" immediately before "a=number+600;"?

Also, you're not even reading from a file, let alone reading four numbers.
Last edited on
please can you write the program .. urgent .
This forum is not for getting fully-written code that you can plagiarize. Make a valid attempt at writing the program yourself and we will help you finish it each time you get stuck.
Topic archived. No new replies allowed.