This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int batasMaksimal = scanner.nextInt(); | |
scanner.nextLine(); | |
String kalimat = scanner.nextLine(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter ' | |
WRONG_EMAIL="[email protected]" | |
NEW_NAME="New Name Value" | |
NEW_EMAIL="[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
int x = input.nextInt(); | |
int y = input.nextInt(); | |
int[][] cities = new int[x][y]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
String kalimat = scanner.nextLine(); | |
char huruf = scanner.next().charAt(0); | |
int jumlahHuruf = hitungJumlahHuruf(kalimat, huruf); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static String capitalizeFirstLetter(String input) { | |
StringBuilder result = new StringBuilder(); | |
boolean capitalizeNext = true; | |
for (char c : input.toCharArray()) { | |
if (Character.isWhitespace(c)) { | |
result.append(c); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Kasir { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String[] namaBarang = {"Buku", "Pensil", "Penghapus", "Penggaris", "Pulpen", "Spidol", "Buku Tulis", "Orotan", "Stabillow", "Buku Gambar"}; | |
int[] hargaBarang = {10000, 2000, 1000, 3000, 5000, 7000, 5000, 2000, 3000, 5000}; | |
System.out.println("Daftar Barang"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class MenghitungBangunRuangDatar { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
byte pilihan, pilihanBangun; | |
pilihanBangun = pilihan = 0; | |
String pilihanUlang = ""; | |
double panjang, lebar, luas, keliling, tinggi, volume; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Solution { | |
public static void main(String[] args) { | |
// Membuat object scanner | |
Scanner scanner = new Scanner(System.in); | |
// Mengambil input gaji | |
String gajiString = scanner.nextLine(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
import java.util.Arrays; | |
public class Solution { | |
public static void main(String[] args) { | |
// Inisialisasi objek Scanner untuk membaca masukan dari pengguna | |
Scanner scanner = new Scanner(System.in); | |
// Membaca masukan waktu dari pengguna sebagai string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ | |
Scanner scanner = new Scanner(System.in); | |