BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

Register FAQ Community Calendar New Posts Navbar Right Corner
HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 2nd Semester > BSIT07-11 2nd > Computer programming for IT

Computer programming for IT Sir Aziz Akhtar


 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 24-04-2008, 05:54 PM
BSIT07-01's Avatar
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
Smile Table of 5-10 Using Nested Loops

Table of 5-10 Using Nested Loops

Here is the source code for a Nested loop to write the Table of 5 upto 10


Code:
#include <iostream>
using namespace std;

int tableof=5;
int tablefrom=5;
int tableto=10;
int counter=1;
int main()
    {
    while(tablefrom<=tableto)
        {
        cout<<endl<<"Table of "<<tableof<<endl;
        while(counter<=10)
            {
    
            cout<<tableof<<"x"<<counter<<"="<<tableof*counter<<endl;
            counter++;
            }
        tablefrom++;
        tableof++;    
        counter=1;
/*Here we have freed up the counter ,Because we have to use it
 to write the next loop*/
        }
    return 0;
    }

Reply With Quote
 

Tags
510, loops, nested, table


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary Table 01 Geeky Table .BZU. Designed Pictures 0 28-04-2011 05:10 AM
Lesson 3: Loops bonfire Introduction to Computing 0 26-02-2011 10:21 PM
Find the AREA of a Home By using Nested Struct C++ shmsa Object Oriented Programming 4 06-09-2008 04:41 AM
Make stars using C++ loops and if statment .BZU. Object Oriented Programming 0 23-08-2008 08:38 PM
Loops & switches BSIT07-01 Web Development 1 21-01-2008 02:38 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 10:01 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.