Results 1 to 4 of 4
Thread: java problem
- 11-02-2012, 06:57 PM #1Member
- Join Date
- Nov 2012
- Rep Power
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.
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 #3
Re: java problem
c) Go through the Forum Rules, particularly the third paragraph.
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- By MrWeavile in forum New To JavaReplies: 3Last Post: 09-01-2012, 09:58 PM
- By Abysinian in forum Advanced JavaReplies: 4Last Post: 03-16-2012, 12:29 PM
- By dragstang86 in forum New To JavaReplies: 4Last Post: 10-30-2011, 04:43 AM
- By Ravanelly in forum Advanced JavaReplies: 0Last Post: 01-07-2011, 10:36 AM
- By mc6415 in forum New To JavaReplies: 10Last Post: 02-22-2010, 01:24 AM