# java problem

Printable View

• 11-02-2012, 06:57 PM
shrooq
java problem
hi i want help from you to solve it

1)Write an application that inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print 4 2 3 3 9 . [Hint: You will need to use both division and remainder operations to "pick off" each digit

2)Assume that int a = 1 and double d = 1.0, and that each expression is independent. What are the results of the following expressions?
i. a = 46 / 9;
ii. a = 46 % 9 + 4 * 4 - 2;
iii. a = 45 + 43 % 5 * (23 * 3 % 2);
iv. a % = 3 / a + 3;
v. d = 4 + d * d + 4;
vi. d + = 1.5 * 3 + (++a);
vii. d - = 1.5 * 3 + a++;

3)Write an application that inputs one number consisting of five digits from the user, and prints the digits in reverse order. For example, if the user types in the number 42339, the program should print 93324.

:(sweat):
• 11-02-2012, 06:59 PM
Fubarable
Re: java problem
Please don't simply dump your homework on this site without asking an answerable question. This site is not for having others do your homework for you. I suggest a) you show us what you've done so far to solve this, and b) ask specific answerable questions about what in particular confuses you. Else we may have to lock this question as a homework dump.
• 11-03-2012, 11:20 AM
DarrylBurke
Re: java problem
c) Go through the Forum Rules, particularly the third paragraph.

db
• 11-03-2012, 01:51 PM
Fubarable
Re: java problem
Thread closed.