Mar 14

buatlah Program yang meminta inputan 1 huruf , dan tentukan huruf tsb huruf kecil atau huruf besar ,
apabila yang diinput lebih dari 1 huruf atau bukan huruf keluarkan pesan “Inputan Tidak Valid”

contoh :

Input : abc
Output : Inputan Tidak Valid

Input : 1
Output : Inputan Tidak Valid

Input : a
Output : Huruf Kecil

 

Coding =

import java.util.*;

public class HurufBesaratauKecil
{
public static void main(String[]args){

Scanner scan = new Scanner (System.in);

String huruf;
char huruf2;
int nomor;

System.out.print(“Masukkan huruf: “);

huruf = scan.next();
huruf2 = huruf.charAt(0);
nomor = huruf.length();

if(huruf2>=97 && huruf2<=122 && nomor==1){

System.out.println(“Huruf yang anda masukkan adalah huruf kecil”);
}
else if (huruf2>=65 && huruf2<=90 && nomor==1){

System.out.println(“Huruf yang anda masukkan adalah huruf besar”);
}
else{

System.out.println(“Input tidak valid”);
}

Mar 14

1. PSEUDOCODE

BEGIN

phi = 3.14

r = input radius

t = input tinggi

Volume = phi multiply r multiply r multiply t

print Volume

END

2. FLOWCHART

Untitled

 

3. NS DIAGRAM

rgy

 

 

 

Mar 14

Welcome to Binusian blog.
This is the first post of any blog.binusian.org member blog. Edit or delete it, then start blogging!
Happy Blogging 🙂