Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

C++

Posted on 2000-04-08
10
Medium Priority
?
170 Views
Last Modified: 2012-05-05
I need to write a program that takes a number & produces the multiplication table up to the user specified number.
a) I must create a function named multiples that takes two numbers as input arguments and returns a void. The first argument is the number for which multiples are to be produced. The second argument is the number of multiples that should be produced. The function will print a line of multiples.
b) Finally, The main function should:
- prompt the user to enter a value.
- use a for or a while loop to step through the values from 1 through the user specified value.
- from the body of the loop, invoke the function created in step a to print a line of output.
I want to include al the variable declarations & the program must run.
I'm obviously brand new to this, but now that I'm retired, I thought it would be fun to learn! oops! I completely lost. Can anyone show me examples and guide me through this?
0
Comment
Question by:rtb8288
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 

Expert Comment

by:vinodkarande
ID: 2695894
Dont mind , but u should at least make some efforts from ur side.....
This is a Exchange-experts site....this site is basically concerned with exchanging opinions on ur incomplete work if ur facing some props.....

I think u should first start implementing the code.....and then ask for some advice if ur facing some props.

regards,
Vinod
0
 
LVL 1

Expert Comment

by:ntdragon
ID: 2695909
we don't do homework
if you have any problem with it ask a question or send us your code and tell us your problem
0
 
LVL 22

Expert Comment

by:nietod
ID: 2695910
We cannot provide answers to school assignments.  That is grounds for removal from this site.  (for both you and the experts involved.)  We can provide only limitied help in accademic assignments.    We can answer specific (direct) questions, like you might ask your teacher.  We can review your work and post suggestions, again, like your teacher might do.

Do you have specific questions?
Do you have any work on this (incomplete even) that we can review?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 10

Expert Comment

by:RONSLOW
ID: 2696063
show us what you have so far (working or not).

here's a little starter if you've gotten absolutely nowhere

>a) I must create a function named multiples that takes two numbers as input arguments and returns a void. The first argument is the number for which multiples are to be produced. The second argument is the number of multiples that should be produced. The function will print a line of multiples.

void multiples (int base, int nmultiples) {
  ...
}

in the function start with multiple = base, then loop thru n-multiple times
each time multiplying multiple by base and outputing multiple using cout.

>b) Finally, The main function should:
>- prompt the user to enter a value.

easy .. write the prompt with cout << and input with cin >>

>- use a for or a while loop to step through the values from 1 through the user specified value.

for loop sounds best .. pretty obvious.

>- from the body of the loop, invoke the function created in step a to print a line of output.

not much there either.

Post your attempted code and wecan help with it.
0
 

Expert Comment

by:levkin
ID: 2735339
He-he Computer Science 101
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 200 total points
ID: 2743221
Well , i think I've helped enough.
0
 

Author Comment

by:rtb8288
ID: 2744195
RONSLOW'S HELP WAS SUPERB; ABOVE AND BEYOND THE CALL OF DUTY!
0
 
LVL 22

Expert Comment

by:nietod
ID: 2744493
Then you should grade his answer and close the question.
0
 

Author Comment

by:rtb8288
ID: 2744810
I've attempted to close the question; I've also attempted to remove myself from the EE list, both unsuccessfully. Please close the question & remove my email address from the list.
0
 
LVL 22

Expert Comment

by:nietod
ID: 2744864
To close the question, select one of the grades (A-D) that you think RONSOW deserves.  Then press the submit button.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question