Hey againThanks for all the help on my project, the teacher hasn't grade it yet but hopefully I did everything correct and I was able to help one of my class mates with there code and got it to work without any code i had
Now she wants us to do a new project:
Write a program that ask the user for a number. Then displays the multiplication table for that number 0-10.
use the following function prototype and code the function definitions
int getNumber( );
void displayTable(int);
use a loop to calculate and display the table
I have it working but without the void displayTable(int); how could I make it including that?
Code:#include <iostream> using namespace std; //Prototypes int getNumber( ); //void displayTable(int); int main() { int tableAnswer; int firstNumber; firstNumber=getNumber(); int Number; for (Number=0; Number<=10; Number++) { tableAnswer=firstNumber*Number; cout<<firstNumber<<" x "<<Number<< " = "<<tableAnswer<<'\n'; } system ("pause"); return 0; } int getNumber() { int Number; cout<<"Please enter a number"<<endl; cin>>Number; return Number; } /*void displayTable(int) { int Number; for (Number=0; Number<=10; Number++) cout<<Number; } */



LinkBack URL
About LinkBacks
Thanks for all the help on my project, the teacher hasn't grade it yet but hopefully I did everything correct and I was able to help one of my class mates with there code and got it to work without any code i had 



