Search Results

Search found 3 results on 1 pages for 'user312309'.

Page 1/1 | 1 

  • What does the C compiler error "looks like a function definition, but there is no parameter list;" m

    - by user312309
    #include <iostream> #include <fstream> using namespace std; int main { int num1, num2; ifstream infile; ostream outfile; infile.open("input.dat"); outfile.open("output.dat"); infile >> num 1 >> num 2; outfile << "Sum = " << num1 + num2 << endl; infile.close() outfile.close() return 0; } this is what i did and when i compile it, i got this error that said error C2470: 'main' : looks like a function definition, but there is no parameter list; skipping apperent body please dont hate me :( i am new at this computer science....

    Read the article

  • write a program that prompts the user to input five decimal numbers

    - by user312309
    This is the question. write a program that prompts the user to input five decimal numbers. the program should then add the five decimal numbers, convert the sum to the nearest integer,m and print the result. This is what I've gotten so far: // p111n9.cpp : Defines the entry point for the console application. // #include <iostream> using namespace std; double a, b , c , d , e, f; int main(int argc, char* argv[]) { cout << "enter 5 decimals: " << endl; cin >> a >> b >> c >> d >> e; f = a + b + c + d + e; return 0; } Now I just need to convert the sum(f) to the nearest integer, m and print the result. How do I do this?

    Read the article

  • write a program that prompts the user to input five decimal numbers : C++

    - by user312309
    This is the question. write a program that prompts the user to input five decimal numbers. the program should then add the five decimal numbers, convert the sum to the nearest integer,m and print the result. This is what I've gotten so far: // p111n9.cpp : Defines the entry point for the console application. // #include <iostream> using namespace std; double a, b , c , d , e, f; int main(int argc, char* argv[]) { cout << "enter 5 decimals: " << endl; cin >> a >> b >> c >> d >> e; f = a + b + c + d + e; return 0; } Now I just need to convert the sum(f) to the nearest integer, m and print the result. How do I do this?

    Read the article

1