|
|
Регистрация Восстановить пароль |
Повторная активизация e-mail |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
04.10.2010, 12:05 | #1 |
Новичок
Джуниор
Регистрация: 03.10.2010
Сообщений: 4
|
маленькие программы в ibm architect
Помогите плиз сделать хотя бы несколько из этих заданий, а то я никак не могу разобраться.
1. Write a program that reads an integer max from the keyboard. If the number are greater than 100, the program writes a random integer to the screen, taken from interval [0;max] (both numbers included). Otherwise it prints an error-message containing the number written by the user. 2. Write a method public String numberToText (int t), thattakes a parameter t between 1 and 6 and returns a text, corresponding to the number. Ex: if t equals 2. it will return "Two". If the number recieved is outside the interval, it returns the text "Outside interval". Yand in: Just a method (not a whole program!) 3. Write a program that reads numbers from the keyboard until it recieves a number<0. It then prints the sum of the numbers read before the 'stop'-number. 4. As you should know,there are 3 different loop-constructions in Java. Rewrite at least one of the following loops to the 2 other possible forms. Please state which one you have rewritten. A: for(int i=-2; i<10;i++) system. out.println(i); B: int i = 10 while(0<i) { System.out.println(i); i/=2; } C: int i = 3 do { System.out.println(i); i+=3; } while(i<=10); Последний раз редактировалось bido; 04.10.2010 в 12:18. |
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Assembler для IBM | oxi | Assembler - Ассемблер (FASM, MASM, WASM, NASM, GoASM, Gas, RosAsm, HLA) и не рекомендуем TASM | 3 | 25.02.2010 08:26 |
Помогите написать маленькие программы для школьника | Sava95 | Фриланс | 8 | 22.11.2009 23:06 |
поменять большие буквы на маленькие и маленькие на большие в си++ | Барби | Помощь студентам | 4 | 08.04.2008 01:25 |
Delphi + IBM DB2 | zetrix | БД в Delphi | 0 | 30.10.2006 12:57 |