What is the assembly program of multiplication table?

I need help formatting this multiplication table for this program.?

  • Write a program that generates multiplication tables for the user. The program will ask the user for a number and generate a multiplication table for that number using nested loops. it suppose to look like this if i enter the number 4 1 2 3 4 ----|----|----|----| 1| 1| 2| 3| 4| -|----|----|----|----| 2| 2| 4| 6| 8| -|----|----|----|----| 3| 3| 6| 9| 12| -|----|----|----|----| 4| 4| 8| 12| 16| -|----|----|----|----| heres my code: #include <iomanip> #include <iostream> #include <string> using namespace std; int main() { char Selection; int num = 0; int number = 0; do { cout << "MENU\n"; cout << "a) Generate Multiplication Table\n"; cout << "q) quit program\n"; cout << "Please make a Selection:\n"; cin >> Selection; if(Selection == 'a') { cout << "Please enter a number to generate a multiplication table\n"; cin >> number; for(int i = 1; i <= number; i++) { for (int j = 1; j <= number; j++) { cout << fixed << setw(4) << "---" << setw(2) << i*j << "\n"; } } } else if(Selection != 'a'|| Selection != 'q') { cout << "invalid selection"; } else if(Selection == 'q') { cout<< "quit the program"; } }while(Selection != 'q'); system("PAUSE"); return 0; }

  • Answer:

    Try declaring variables on a single line.

David at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

Try declaring variables on a single line.

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.