hi,
I need the answer as soon as you can

Write a c++ program that prompts the user to enter an integer number greater than Zero (0) and prints a multiplication table up to that number. The program should display an error message an and loop until an accepted value is entered

The program should run as follows:

Enter a number: -5

Error , Enter a number: -6

Error , Enter a number: -2

Error , Enter a number: 5

1 2 3 4 5

2 4 6 8 10

3 6 9 12 15

4 8 12 16 20

5 10 15 20 25


and thanks

Have you atleast written some code and ATTEMPTED to write this program?

If so, Post the code (use code tags) and ask a specific question about some code you are having problems with. Then myself or others would gladly HELP.


If NOT...

commented: Well said +30

>>I need the answer as soon as you can
We need your to leave this website as soon as you can.
Or:
Read the forum guidelines ( I usually posts the link along but for you, no mercy)
Read the sticky thread by Narue: Read before posting
Read the Forum announcement by the Administrator.

We are not your slave. Neither are you our employer. We are sitting here to help. Not to accept orders from some Tom Dick and Harry.

commented: You've taken being a jerk a little too far in this post. +17
commented: Take it easy dude... have some tea and a smoke ;) -3
commented: Works for me :) +30

>> Take it easy dude... have some tea and a smoke - niek_e
>>You've taken being a jerk a little too far in this post. - WaltP
I don't understand you guys. You may be generous to the 'lazy' visitors of this website, I am not.
I can stay happy enough on the fact that I said nothing wrong.
I don't smoke, it kills.

I don't understand you guys. You may be generous to the 'lazy' visitors of this website, I am not.

I'm not 'generous' to lazy posters. But I don't tell them to leave the website immediately..
I would point out to them, that giving homework is against daniweb rules and ask them to show some effort. If they respond with a post that shows some effort (code), I'll be still happy to help them out. If not: they get the ignore-treatment.

Because they might new to the concept of forums, they might not know of these rules yet. (although they should have read them upon registering, but you know: everyone makes mistakes).

I don't smoke, it kills.

Yes it does, as all the better things in live do. Like coffee, alcohol and greesy burgers :)

commented: Exactly +17

I would point out to them, that giving homework is against daniweb rules and ask them to show some effort. If they respond with a post that shows some effort (code), I'll be still happy to help them out.

You must have missed the 'OR' part of the post #3.

>>Yes it does, as all the better things in live do. Like coffee, alcohol and greesy
>>burgers
Ummm....... can you make coffee an exception. I love it like anything. It doesn't kill actually.(even if it does, I don't mind)

Member Avatar for iamthwee
#include <iostream>
#include <iomanip> 
class Fools
{
public:
   void bar()
   {
      int a;
      do
      {
         std::cout << "Enter a number:";
         std::cin >> a;

         for ( int i = 1; i <= a; i++ )
         {
            for ( int j = 1; j <= a; j++ )
            {
               std::cout << std::setw ( 5 ) << i * j  ;
            }
            std::cout << "\n";
         }

         std::cin.get();
      }while ( a <= 0 );
   }
};

int main()
{
   Fools gold;
   gold.bar(); 
   std::cin.get();
}
commented: Ahhh, another case of giving the lazy a$$ a free ride! You're the greatest. -3

You must have missed the 'OR' part of the post #3.

You must have missed the smiley to show you were kidding. Reread post #3 through the eyes of an extremely new (albeit lazy) student. What's it say to you then?

I say: your eyes must be burning.
I also reread it with eyes of a Noob. Here is what I did next:
I went on searching where these Announcements or Sticky threads are there.
=>Either I was able to find out:
I apologized on this thread. Or perhaps said "I am new, thats why I didn't knew this"
=>Or I was not able to find out those announcement:
I requested on the thread for the links of the announcements

Then I realized, thats its not nice to throw instruction in a new place. So I apologize and seek help again.

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.