1 / 5

POSLOUPNOST úkol 1_41

POSLOUPNOST úkol 1_41. ZADÁNÍ. Sestavte program, který doplní tabulku nepřímé úměrnosti pro hodnoty proměnné x = 1, …, n. Nepřímá úměrnost je zadána uživatelem prvotními hodnotami x a y. VÝVOJOVÝ DIAGRAM. ZDROJOVÝ KÓD. public class NeprimaUmernost {

Download Presentation

POSLOUPNOST úkol 1_41

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. POSLOUPNOST úkol 1_41

  2. ZADÁNÍ Sestavte program, který doplní tabulku nepřímé úměrnosti pro hodnoty proměnné x = 1, …, n. Nepřímá úměrnost je zadána uživatelem prvotními hodnotami x a y

  3. VÝVOJOVÝ DIAGRAM

  4. ZDROJOVÝ KÓD public classNeprimaUmernost { public static voidmain(String[] args) { int n, i = 1; float x,y,k = 0; System.out.print("Zadej promennou x = "); x =VstupDat.ctiFloat(); System.out.print("Zadej promennou y = "); y =VstupDat.ctiFloat(); k = x*y; System.out.print("Zadej pocetcisel v tabulce: "); n = VstupDat.ctiInt(); System.out.println(" x y "); while(i <= n) { y = k/i; System.out.println(" "+i+" "+y); i++; } } }

  5. ZDROJOVÝ KÓD Hotový program v JCreator NeprimaUmernost.java

More Related