Need help with a script

Discussion in 'Programming/Scripts' started by ajsmith1104, Oct 1, 2008.

  1. ajsmith1104

    ajsmith1104 New Member

    for some reason I cannot figure out the next step. They want the script to add the 5 inputed decimals and convert them to the nearest integer and Im stuck any help is appreciated thanks. This is what I have so far.

    #include <iostream>

    using namespace std;
    int main()
    int var1;
    int var2;
    int var3;
    int var4;
    int var5;

    cout << "Enter five numbers with decimals seperated by spaces. " <<
    cin >> var1 >> var2 >> var3 >> var4 >> var5;

    return 0;

  2. burschik

    burschik New Member

    When do you have to hand in your homework?

Share This Page