AllExperts > Word Problems 
Search      
Word Problems
Volunteer
Answers to thousands of questions
 Home · More Word Problems Questions · Answer Library  · Encyclopedia ·
More Word Problems Answers
Question Library

Ask a question about Word Problems
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scott A Wilson
Expertise
Story problems with any relation to math.

Experience
I started doing story problems in grade school and have been helping people ever since.

Education/Credentials
BA in Mathematical Sciences from OSU. MS in Mathematics from OSU

Awards and Honors
Both my BS and MS degree were with honors.

Past/Present Clients
Thousands of questions right here.

 
   

You are here:  Experts > Science > Math for Kids > Word Problems > Math Word problem

Word Problems - Math Word problem


Expert: Scott A Wilson - 10/19/2009

Question
Help please. Problem = A five digit number with 5 different digits. Place a 2 in front of number to make it a six-digit number.
Multiply the six-digit number by 16. The answer is a seven digit number that begins with the original five-digit number, followed by a 2 and then 0. What is the original five-digit number?

Thanks for help.

Answer
I thought about how to do this, and then decided to let the computer figure it out.
I wrote a quick little program in C++ to do this.  It is given:

#include <stdio.h>
// Take a five digit number, put a 2 in front, multiply by 16, begins with first five digits
// k is the number xxxxx
// n=(200000+k)
// while (n>9999999) n=n/10
// if n=k, put n

void main() {  
 long int k;  // number used
 long int b;  // base multiplier
 long int r;  // result of bk*16

 printf ("This program finds a number such that when 200,000 is added to it and\n");
 printf ("the number is multiplied by 16, the first five digits of the answer\n");
 printf ("are the original number.\n\n");

 k = 10000;   //  k is at least five digits
 while (k<=99999) {
   r = 16*(200000+k);
   if (r/100 == k)   printf ("And the numbers are %ld %ld", k, r);
   k = k + 1;
  }
}
Output: 38095 3809520
The last line is the number and the number n and then 16(200000+n).


Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.