okay well maybe the programming world is not for me then im just a student trying to pass the class that my teacher did not teach because i asked 5/25 students in the class and the teacher did not teach this material.
Printable View
okay well maybe the programming world is not for me then im just a student trying to pass the class that my teacher did not teach because i asked 5/25 students in the class and the teacher did not teach this material.
Your teacher taught you about arithmetic operations, for loops, reading from standard input and printing text to standard output (the console window, in this case), right? That is enough to solve this problem, assuming that you apply what was taught.
Would you prefer the solution on a silver plater like this
or the way these members had been trying to guide you in the right direction?Code:#include <iostream>
#include <string>
int main()
{
std::string ll1l;
for(int ll(0), lll(4000),l1(0), ll1(5), l1l(100);
ll++ != ll1 && (std::cout << "Sales amount: ", std::cin >>l1);
std::cout << ll1l.append((l1 < 0 ||l1 > lll ?
(std::cout << "Try again: ", std::cin >>l1, --ll) :l1)/ l1l, '*')
<< "\n" , ll1l.clear());
}
It's your choice.
And BTW, follow this example at your own risk ;)
PotatoCode, you made my day! Looks like Paul McKenzie has been cloned.
@monarch_dodra:
Haha thanks. I hope I didn't break the forum rules by doing his homework
@GNiewerth:
Glad you had a good time reading it.
And I had a feeling it was done before many times :)
@Sabensohn70:
I'm sorry for turning this into something that I thought funny.
You can payback on my future post and I won't say a word.
And I think it's good that you consider yourself a beginner.
For the question you asked about using loop
Conditional Statement
A decent site that I think suitable for new learners like yourself.
C++ Basic Tutorial
A general reference site to get little deeper
Reference site (www.cplusplus.com)
And for the terms that are used in programming world that are not familiar to you
C++ Glossary
There are more,
but these are good sites for the beginners to get start on their independant study