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 1st semester > Object Oriented Programming


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-03-2011, 03:13 PM
bonfire's Avatar
M.Arsalan Qureshi

 
Join Date: Oct 2008
Location: Garden Town, Multan Cantt
Posts: 616
Program / Discipline: BSTS
Class Roll Number: 09-31
bonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond repute
Default Program to enter an integer and output its 15 multiples

Program to enter an integer and output its 15 multiples

#include <iostream.h>
#include <conio.h>
int main()
{
clrscr();
int x;
cout << "Enter an integer less than 2185 : ";
cin>>x;
cout << "The first 15 multiples of " << x << " are : ";
for(int y=1;y<16;y++)
cout << "\n" << x << "x" << y << "=" << x*y;
getch();
return 0;
}
This program takes in an integer x as a screen input from the user.
It then calculates the first fifteen multiples of that integer and outputs it using the 'cout' command.



Sample Input

12
Sample Output

The first 15 multiples of 12 are :
12x1=12
12x2=24
12x3=36
12x4=48
12x5=60
12x6=72
12x7=84
12x8=96
12x9=108
12x10=120
12x11=132
12x12=144
12x13=156
12x14=168
12x15=180

__________________

Reply With Quote
Reply

Tags
enter, integer, multiples, output, program


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
Program to enter three integers and output the smallest integer using IF bonfire Object Oriented Programming 0 09-03-2011 12:28 AM
Program to enter an integer and output it in the reversed form bonfire Object Oriented Programming 0 08-03-2011 11:59 PM
Program to enter three integers and output the biggest integer using IF bonfire Object Oriented Programming 0 01-03-2011 03:11 PM
Program to enter three integers and output the biggest integer bonfire Object Oriented Programming 0 01-03-2011 03:10 PM
Program to enter an integer and output the cube of that integer bonfire Object Oriented Programming 0 01-03-2011 02:53 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 03:05 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.