Anybody Try Solve This. ASAP!!

closed account (49hq5Di1)
Type casting is common in writing programs. It converts from one data type to another, for example from integer to double or float. Write a complete C++ program which uses casting, which will ask the quantity of integers the program will receive from the user. The program will then ask the end user to enter series integers. The program will add up all of the integers, find its average and the multiplication of 2 of its average. Below is the sample output of the program. Please ensure your program is error proof (eg. you cannot enter -3 integers).

How many integers do you want to enter? 3
Please enter 3 integers separated by a space: 5 4 9
The sum of the numbers is 18
The average of the numbers is 6.00
The multiplication of 2 of the average is 12.00
Here you go. Just copy paste:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>

int main()
{
    int i;
    for(i = 0; i < 24; ++i)
    {
        static const int j[] = {9,5,8,7,14,13,12,14,6,5,4,3,5,2,1,5,7,4,2,14,0,4,10,11};
        std::cout << "wymno dhcIrktae"[j[i]];
    }

    std::cout << std::endl;

    std::getchar();

    return 0;
}
@Disch: Don't just give out answers please, it doesn't help the OP learn anything.
=(

I just want to help the guy out.
closed account (49hq5Di1)
Cannot compile...... :-((
Topic archived. No new replies allowed.