reset password
Author Message
aalva190
Posts: 64
Posted 13:42 Apr 17, 2016 |

Is there anyone that could suggest anything, how to reverse the numbers given by the user? 
Any suggestions are fine, not looking for an answer. just hints suggestions ect. 

THank you.

mattsegovia
Posts: 3
Posted 13:46 Apr 17, 2016 |

Refer to HW02P05.

Hint: see if you can come up with another way to reverse.

aalva190
Posts: 64
Posted 13:49 Apr 17, 2016 |

I was going to do that as well. The only thing is that, doesnt the problem say to no separate the digits?

mattsegovia
Posts: 3
Posted 14:00 Apr 17, 2016 |

You're right, just realized that. However, I'm not sure if it was referring to the way you would input the number.

aalva190
Posts: 64
Posted 14:02 Apr 17, 2016 |

Yeah, same here but i think he wants the whole thing. I mean if we do it like how we did problem 5 in homework 2, it sounds to easy.

I feel it must be a harder way since it is the last problem at long as i am overthinking it. Keenan Please, suggest something ? If you can. :)

 

304374842
Posts: 56
Posted 14:33 Apr 17, 2016 |

I think he wants the values to be input together so that you have to figure out the formula to separate them. My understanding was that he didn't want five separate integers input one at a time.

aalva190
Posts: 64
Posted 14:36 Apr 17, 2016 |

Well we can easily figure out a formula how to separate them, except i am not sure if separating them will not go against the sentence he says, "Your program must read the entire number, not digit by digit.)" 

 

304374842
Posts: 56
Posted 14:39 Apr 17, 2016 |

I think when he says read it means read in. I don't think there's a way to do it without separating the digits (at least none that we know),

aalva190
Posts: 64
Posted 14:40 Apr 17, 2016 |

That actually make sense lol, Yes alright then i ma do the method like problem 5 in homework 2. Thanks 

 

kknaur
Posts: 540
Posted 18:22 Apr 17, 2016 |

When you enter the numbers I want you to enter it like

Enter an integer 12321

Instead of:

Enter the first digit: 1
Enter the second digit: 2
Enter the third digit: 3

and so on...

Internally once you have the number you will need to parse (separate) the digits individually.