Stránka: 1 z 1
| [ Príspevkov: 5 ] | |
Autor | Správa |
---|
Registrovaný: 07.03.07 Prihlásený: 13.07.24 Príspevky: 803 Témy: 169 | 169 |
83. Neparne_2 *
Vytvorte program, ktorý vypíše všetky nepárne čísla z intervalu <a,b>. Hranice intervalu
sú ľubovolné celé čísla
pouzite for to do a bez poli.
mne to akosi nejde dobre, vypisuje vsetko parne aj neparne a neviem ako tomu zabranit.
|
|
Registrovaný: 13.04.07 Prihlásený: 15.05.09 Príspevky: 68 Témy: 9 | 9 |
Kód: program Axwell; uses crt; var a,b,i,premenna :integer ; begin clrscr; writeln ('Zadaj interval a-b'); readln(a); readln(b); premenna:= (b-a) div 2; if (a mod 2)=1 then for i:=1 to premenna+1 do begin write(a,' '); a:=a+2; end else for i:=1 to premenna do begin write(a+1,' '); a:=a+2; end; readln; end.
hmm preco to nerobis ty? ved tie priklady su naozaj jednoduche.. aspon by si sa nieco naucil a mozno by sa ti to aj zapacilo
|
|
Registrovaný: 30.04.08 Prihlásený: 15.05.15 Príspevky: 884 Témy: 3 | 3 |
neznamy píše: [code]hmm preco to nerobis ty? ved tie priklady su naozaj jednoduche.. aspon by si sa nieco naucil a mozno by sa ti to aj zapacilo njn s tym suhlasim... inak nechapem, preco si to riesil tak zlozito mne to vyslo takto Citácia: program Axwell; var A,B,I: integer; begin write('Zadajte interval: '); readln(A,B); for I:=A to B do if (I mod 2)=1 then writeln(I); readln; end.
|
|
Registrovaný: 07.03.07 Prihlásený: 13.07.24 Príspevky: 803 Témy: 169 | 169 |
ved som to robil, ibaze trochu inak ale nakoniec to nebolo dobre, dnes som uz 8 programov spravil sam
|
|
Registrovaný: 13.04.07 Prihlásený: 15.05.09 Príspevky: 68 Témy: 9 | 9 |
lol jasne sry ![:D](https://www.pcforum.sk/images/smilies/smile01.gif) som zmagoreny zo skuskoveho teraz.. mas to 1000 krat lepsie
|
|
Stránka: 1 z 1
| [ Príspevkov: 5 ] | |
Podobné témy | Témy | Odpovede | Zobrazenia | Posledný príspevok |
---|
![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 0 | 439 | 19.12.2014 13:18 Styracoz | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 2 | 620 | 24.06.2010 20:17 KatjushaMan | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 4 | 2517 | 01.03.2018 8:02 MTK | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 5 | 953 | 18.10.2008 19:02 redog | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read_hot.gif) | [ Choď na stránku: 1, 2 ] v Assembler, C, C++, Pascal, Java | 40 | 1579 | 11.12.2016 22:08 viki | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 2 | 1158 | 09.03.2007 14:08 misolax | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 6 | 782 | 08.01.2009 17:45 majka090 | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 0 | 755 | 03.05.2009 12:35 ebb | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Kôš | 1 | 30 | 06.11.2018 14:38 werwest | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read_hot.gif) | v Assembler, C, C++, Pascal, Java | 11 | 1328 | 07.04.2007 16:50 programator | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 7 | 668 | 09.10.2011 21:30 F3RY | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read_hot.gif) | v Assembler, C, C++, Pascal, Java | 19 | 3120 | 30.04.2007 19:54 nikita | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 7 | 879 | 14.05.2011 20:04 F3RY | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 1 | 402 | 18.06.2013 13:36 BX | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 1 | 489 | 21.12.2017 23:45 magic | ![V tomto fóre nie sú ďalšie neprečítané témy. V tomto fóre nie sú ďalšie neprečítané témy.](https://www.pcforum.sk/styles/white/imageset/topic_read.gif) | v Assembler, C, C++, Pascal, Java | 3 | 402 | 16.05.2012 22:49 nBXXL |
|