Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import java.util.Scanner; public class Main { public static void main(String[] args) { for(int i=0; i<11; i++) System.out.print("* "); System.out.println(); System.out.println("* PROGRAM - SREDNIA *"); for(int i=0; i<11; i++) System.out.print("* "); System.out.println(); System.out.println(); Scanner klawiatura=new Scanner(System.in); int wybor=0; String imie; System.out.print("Podaj imie: "); imie=klawiatura.next(); do { System.out.println("Witaj "+imie+"! Co chcesz zrobic?"); System.out.println("1. Oblicz srednia"); System.out.println("2. Zmien imie"); System.out.println("3. Koniec"); System.out.println(); System.out.print("Twoj wybor: "); wybor=klawiatura.nextInt(); switch(wybor) { case 1: double a, b, c, srednia; System.out.print("Podaj a: "); a=klawiatura.nextDouble(); System.out.print("Podaj b: "); b=klawiatura.nextDouble(); System.out.print("Podaj c: "); c=klawiatura.nextDouble(); srednia=(a+b+c)/3.0; System.out.println("Srednia: "+srednia+"\n"); break; case 2: System.out.print("Podaj imie: "); imie=klawiatura.next(); System.out.println(); break; } } while(wybor!=3); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)