In relation to another post, I did enroll in the Game Institute. http://www.gameinstitute.com/
Thanx for the input Thanx for the help "lAmoebal". It actually is helping more then when I was following along with other tutorials I have tried. Maybe it 's the structure. I still find C++ difficult. for example.
An excersise asks me to write a program that has a user entering five numbers. Then , average thse numbers, and display the result. So, far. So, good.
But, when the numbers are displayed, ther are grouped together. How do I space the numbers out in the display. [B]Please, give me hints or clues. Or point me in the right direction. TY[/B]
#include <iostream>
using namespace std;
int main()
{
//Declare variables
float a, b, c, d, e;
cout << "Please enter a number: ";
cin >> a ;
cout << "Please enter a number: ";
cin >> b ;
cout << "Please enter a number: ";
cin >> c ;
cout << "Please enter a number: ";
cin >> d ;
cout << "Please enter a number: ";
cin >> e ;
cout << "The average of: " << a << b << c << d << e <<" = " << (a+b+c+d+e)/5 <<endl <<endl <<endl;
}
jeffige 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
jeffige 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.