Tugas Praktikum O9

  • Uploaded by: Gandalivs
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tugas Praktikum O9 as PDF for free.

More details

  • Words: 148
  • Pages: 3
1.Output : Luas Arsiran Proses : Luas Stiga=0,5*alas*tinggi; Luas Lingkaran = 0,5*3,14*diameter; Luas Arsiran=Luas Stiga-Luas Lingkaran; Input : Alas,Tinggi,Diameter SourceCode: class ganda{ public static void main(String []arggss)throws Exception { DataInputStream ww= new DataInputStream(System.in); double Luas, L, LArs; //input alas System.out.print("Input Alas STiga

= ");

String x= ww.readLine(); double alas=Double.parseDouble(x); //input tinggi System.out.print("Input Tinggi STiga = "); String o= ww.readLine(); double ting=Double.parseDouble(o); //input Diameter System.out.print("Input diameter

= ");

String k= ww.readLine(); double dm=Double.parseDouble(k); //Proses Luas=0.5*alas*ting; L=0.5*3.14*5; LArs=Luas-L; //Output System.out.println("Luas Arsiran } } Output

:

= "+LArs);

FlowChart

:

2.Output :BAHAS pemrograman Proses : kata1.Uppercase(); Kata2.Lowercase(); Input : kata1,kata2 SourceCode : import java.io.*; class Ganda2{ public static void main(String[]args) throws Exception { DataInputStream ww= new DataInputStream(System.in);

String kata1,kata2; System.out.println("Input = "); System.out.print("

Kata 1 = ");

kata1=ww.readLine(); System.out.print("

Kata 2 = ");

kata2=ww.readLine(); System.out.println("Output = "+kata1.toUpperCase()+" "+kata2.toLowerCase()); } } Output :

FlowChart : START

kata1; kata2;

kata1.toUpperCase(); kata2.toLowerCase()

kata1,kata2

STOP

Related Documents

Tugas Praktikum O9
June 2020 16
O9
May 2020 1
Tugas Praktikum
April 2020 26
Enat O9
April 2020 6

More Documents from "Avielia Putri W."

Tug As 9
June 2020 20
Modul 4,5,6 Revisi
June 2020 25
Tugas Praktikum O9
June 2020 16
Modul 78
June 2020 18