View Single Post
  #4  
Old 24-04-2008, 11:39 PM
BSIT07-01's Avatar
BSIT07-01 BSIT07-01 is offline
Addicted to Computer


 
Join Date: Sep 2007
Location: ------------
Age: 34
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
BSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant future
Thumbs up Re: Table of 5-10 Using Nested Loops

More Precise Form with three Variables Instead of 4

Code:
#include <iostream>
using namespace std;

int tableof=5;
int tableto=10;
int counter=1;
int main()
    {
    while(tableof<=tableto)
        {
        cout<<endl<<"Table of "<<tableof<<endl;
        while(counter<=10)
            {
    
            cout<<tableof<<"x"<<counter<<"="<<tableof*counter<<endl;
            counter++;
            }
        
        tableof++;    
        counter=1;
        }


    return 0;
    }

Reply With Quote