Belajar Java [Dasar] - 30 - Latihan Looping Sederhana

  Рет қаралды 41,957

Kelas Terbuka

Kelas Terbuka

Күн бұрын

Пікірлер: 109
@rizkirachmanudin4871
@rizkirachmanudin4871 6 жыл бұрын
mantul, udah saya sebar luaskan ke adik2 tingkat dan teman2 saya di kampus :) terus bermanfaat ilmunya dan barokah selalu :D ammiinn
@KelasTerbuka
@KelasTerbuka 6 жыл бұрын
Waduh...siaaaap!!!!! Thanks bro
@danydash2708
@danydash2708 4 жыл бұрын
Aku sampe sini aja udah bisa bikin aplikasi sederhana, buat mempermudah perhitungan di perkerjaan. Cuma belum bisa bungkus app nya aja haha.. makasih banyak kelas terbuka. Mantep! Mantep banget! Salam buat si otong bang!
@zulfakamal7048
@zulfakamal7048 2 жыл бұрын
tutorialnya keren bang bener2 mudah di pahami..
@tsa_jim_ha_kho
@tsa_jim_ha_kho 4 жыл бұрын
saya like,komen,and subscribe supaya mas nya dapat komisi dari youtube
@sopatersiringoringo813
@sopatersiringoringo813 2 жыл бұрын
// while loop public static void main(String[] args) { // program untuk menjumlahkan angka dengan rentang Scanner inputUser = new Scanner(System.in); int nilaiAwal, nilaiAkhir, total; System.out.println("Menggunakan while loop"); System.out.print("masukkan nilai awal : "); nilaiAwal = inputUser.nextInt(); System.out.print("masukkan nilai akhir : "); nilaiAkhir = inputUser.nextInt(); total = 0; while(nilaiAwal
@triabadi4555
@triabadi4555 5 жыл бұрын
baru nemu tutorial looping yang jelasinnya se miningful ini..opotoh miningful wkwkwk thanks pak :D
@transferknowledge5153
@transferknowledge5153 4 жыл бұрын
import java.util.Scanner; public class tugas1{ public static void main(String[] args) { Scanner inputUser = new Scanner(System.in); int a,b,c; System.out.print("ini tugasnya pak guru pake for loop hehe"); System.out.print("masukan nilai awal ="); a = inputUser.nextInt(); System.out.print("masukan nilai akhir ="); b = inputUser.nextInt(); c = 0; for (int nilai = a; a
@bad7063
@bad7063 6 жыл бұрын
Mantap, nnti sekalian praktek buat program tahap per tahap om
@khairi1671
@khairi1671 11 ай бұрын
BANGGGG GUA BISA NGERJAIN PR SEKALI TANPA ADA ERORRRRR.SENENGGG BANGET GUA BANGGGGG🤩😁😁
@herveiulianonatamapurba3437
@herveiulianonatamapurba3437 Жыл бұрын
Jawaban Tugas di Akhir Video: import java.util.Scanner; public class Main { public static void main(String[] args) { int nilaiAwal, nilaiAkhir; int total = 0; boolean kondisi = true; Scanner inputUser = new Scanner(System.in); System.out.print("Masukkan nilai awal : "); nilaiAwal = inputUser.nextInt(); System.out.print("Masukkan nilai akhir : "); nilaiAkhir = inputUser.nextInt(); // Do While Loop : do{ total += nilaiAwal; if(nilaiAwal>=nilaiAkhir){ kondisi = false; } nilaiAwal++; } while(kondisi); // For Loop : for(nilaiAwal = nilaiAwal;nilaiAwal
@falachyusuf6917
@falachyusuf6917 3 жыл бұрын
let me try my best hahaha
@nazwaclash1324
@nazwaclash1324 2 жыл бұрын
do while loop: import java.util.*; public class Tutor22LatihanLoopingSederhana { public static void main(String[] args) { int angkaawal,angkaakhir,total; boolean kondisi=true; Scanner userInput=new Scanner(System.in); System.out.print("masukan angka awal="); angkaawal=userInput.nextInt(); System.out.print("masukan angka akhir="); angkaakhir=userInput.nextInt(); total=0; do{ total=total+angkaawal; System.out.println("ini adalah hasil total penjumlahan="+angkaawal+" menjadi="+total); angkaawal++; if(angkaawal>=angkaakhir){ System.out.println("masukan angka awal lebih kecil dibandingkan angka akhir"); } }while(angkaawal
@aryayunanta1470
@aryayunanta1470 4 жыл бұрын
mantap
@unnamed9149
@unnamed9149 4 жыл бұрын
banyakin bang prnya biar sehabis ngoding tambah faham
@fff_febryn
@fff_febryn 3 жыл бұрын
Scanner input = new Scanner(System.in); int hasil = 1; System.out.print("masukan batas : "); int batas = input.nextInt(); for (int nilai = 1; nilai
@agriswidyan9668
@agriswidyan9668 4 жыл бұрын
Permisi bang mw ngumpul tugas :v mohon koreksi dan sarannya public static void main(String[] args) { // Latihan loop sederhana // Program penjumlah angka dengan rentang nilai Scanner inputUser = new Scanner(System.in); int n_awal,n_akhir,total; System.out.print("Masukkan nilai awal = "); n_awal = inputUser.nextInt(); System.out.print("Masukkan nilai akhir = "); n_akhir = inputUser.nextInt(); // inisialisasi nilai total total = 0; while (n_awal
@gussugi9787
@gussugi9787 2 жыл бұрын
bang, ,mow nanya, titik koma di perulangan for sebelum x itu buat apa yahh??
@rsyah1936
@rsyah1936 Жыл бұрын
@@gussugi9787itu buat misahin inisasi, kondisi, sama increment. jadi walopun ngak di tulis ( ; ) mesti ditulis contoh : //contoh normal for ( int i = 0 ; i
@gussugi9787
@gussugi9787 Жыл бұрын
@@rsyah1936 makasih kak
@boyvinnix6118
@boyvinnix6118 5 жыл бұрын
Serah Tugas sensei for loop int awal, akhir, total; Scanner input = new Scanner(System.in); System.out.print("Nilai Awal = "); awal = input.nextInt(); System.out.print("Nilai Akhir = "); akhir = input.nextInt(); total = 0; for (awal = awal; awal
@rickywahyuhidayat9567
@rickywahyuhidayat9567 5 жыл бұрын
System.out.println("program while"); int awal, akhir, total; Scanner input = new Scanner(System.in); System.out.print("Masukan nilai awal = "); awal = input.nextInt(); System.out.print("Masukan nilai akhir = "); akhir = input.nextInt(); System.out.println(""); total = 0; while (awal
@IrsanAchmad
@IrsanAchmad 2 жыл бұрын
permisi bang saya mau ngumpulin tugasnya, sebelumnya maaf saya telat 3 tahun ngumpulinnya :) import java.util.*; public class coba{ public static void main(String[] args) { Scanner input = new Scanner(System.in); //deklar int awal,akhir,total; //input System.out.print("masukan nilai awal : "); awal = input.nextInt(); System.out.print("masukan nilai akhir : "); akhir = input.nextInt(); //proses total = 0; while(awal
@zulfakamal7048
@zulfakamal7048 2 жыл бұрын
mantap bang..
@bima0205
@bima0205 2 жыл бұрын
mantab bang package latihan; import java.util.Scanner; public class d13_12_2002d { public static void main(String[] args) { Scanner v = new Scanner(System.in); System.out.println("nilai a: "); int a = v.nextInt(); System.out.println("nilai b: "); int b = v.nextInt(); for (int aa = 0; a
@Music-tp4mh
@Music-tp4mh 6 жыл бұрын
bang saya salah satu dari subscruber abang saya kuliah di salah satu kampus di bali ,, bang minta tolong buat tutorial bang untuk UAS pemrograman tgl 3 ini di suruh buat calender sama perkalian matriks,, nah.... mumpung konten abang bermanfaat semu janji dah tak like semu video abang😆😆 saya baru blajar pemrograman bang dan masih smester 1 minta tolong bang buat tutoria calender ama perkalian matriks
@danyajysajywo6624
@danyajysajywo6624 3 жыл бұрын
package Tugas; import java.util.*; public class PR1 { public static void main(String[]args){ System.out.println("menjumlahkan angka rentang menggunakan Forr Looping"); int nilaiAwal, nilaiAkhir, total; Scanner inputUser = new Scanner(System.in); System.out.println("Masukan nilai awal : "); nilaiAwal = inputUser.nextInt(); System.out.println("Masukan nilai akhir : "); nilaiAkhir = inputUser.nextInt(); for ( total = 0; nilaiAwal
@SyauqiMubarok
@SyauqiMubarok 2 жыл бұрын
buat for loop nya for ( ; nilaiAwal
@rendivs925
@rendivs925 2 жыл бұрын
ini bwaaaangg: import java.util.*; public class For { public static void main(String[] args) { Scanner inputUser; int total, nilaiAwal, nilaiAkhir; inputUser = new Scanner(System.in); total = 0; System.out.print("nilai awal: "); nilaiAwal = inputUser.nextInt(); System.out.print("nilai akhir: "); nilaiAkhir = inputUser.nextInt(); for (nilaiAwal = nilaiAwal; nilaiAwal
@waspenwaspen9468
@waspenwaspen9468 5 жыл бұрын
kieu sanes kang tah,, package com.tutorial; import java.util.*; public class Main { public static void main(String[] args) { System.out.println("==== LATIHAN LOOPING WHILE ===="); Scanner inputUser; int nilaiAwal, nilaiAkhir, total; inputUser = new Scanner(System.in); System.out.println("---> Start Program"); System.out.print("Silahkan masukan nilai awal = "); nilaiAwal = inputUser.nextInt(); System.out.print("Silahkan masukan nilai akhir = "); nilaiAkhir = inputUser.nextInt(); total = 0; while (nilaiAwal
@Uher-ox8pn
@Uher-ox8pn 9 ай бұрын
System.out.println(" Ini adalah PR looping dari kelas terbuka:"); int n_Awal, n_Akhir, n_Total; Scanner inputUser2 = new Scanner(System.in); System.out.print("\tMasukkan nilai awal : "); n_Awal = inputUser2.nextInt(); System.out.print("\tMasukkan nilai akhir : "); n_Akhir = inputUser2.nextInt(); n_Total = 0; System.out.println(" "); for(; n_Awal
@jagadraya4638
@jagadraya4638 3 жыл бұрын
Bg,latihannya pakek tabel dong,biar jgn source code aja digunakan. Sekalian biar tau fungsi masing2 tabel2 yg disediakan software java itu.
@prenki7051
@prenki7051 6 жыл бұрын
Sip
@SanopJuntak
@SanopJuntak 5 жыл бұрын
Tugasku sudah selesai kang.. Kalau ada waktu, jangan lupa ngecompile2 y kang.. import java.util.*; public class LatihanLooping{ public static void main(String[] args) { int x,y,l1,l2,l3 = 0,l4,m1,m2,m3=0,m4,n1,n2,n3 = 0,n4; Scanner i=new Scanner(System.in); System.out.print("Masukkan nilai awal : "); x = i.nextInt(); System.out.print("Masukkan nilai akhir : "); y = i.nextInt(); System.out.println("======Ini adalah While Loop======"); l1 = x; l2 = y; while (l1
@campurnada4633
@campurnada4633 5 жыл бұрын
saya ngertinya cuma for doang, gak sulit klo for, do while bingung abis, gak tertarik saya coding pake do while
@aivmcreative
@aivmcreative 3 жыл бұрын
package com.tutorial; import java.util.*; public class Main { public static void main(String[] args) { //program untuk melanjutkan angka dengan rentang int nilAwal, nilAkhir, total; Scanner inputUser = new Scanner(System.in); System.out.print("Masukkan Nilai Awal = "); nilAwal = inputUser.nextInt(); System.out.print("Masukkan Nilai Akhir = "); nilAkhir = inputUser.nextInt(); for (total = 0; nilAwal
@benihandoko4674
@benihandoko4674 6 жыл бұрын
mantap nih nnti bahas cspc kang pke c++, msih stay nunggu django kang hehe
@dedesubarkahchannel0140
@dedesubarkahchannel0140 4 жыл бұрын
SAYA YANG "FOR LOOP" SAJA BANG, KARENA JAWABAN KAWAN-KAWAN UNTUK "FOR LOOP" TIDAK BISA MENGATASI KLO NILAI AWALNYA TIDAK DI MULAI DARI 0 package com.tutorial; import java.util.Scanner; public class main { public static void main(String[] Args) { int dataAwal, dataAkhir, awalLoop,d, hasil; Scanner dataInput = new Scanner(System.in); System.out.print("masukkan data awal = "); dataAwal = dataInput.nextInt(); System.out.print("masukkan data akhir = "); dataAkhir = dataInput.nextInt(); hasil = 0; d = dataAwal; for (awalLoop = dataAwal ; d
@RindraAniko
@RindraAniko 3 жыл бұрын
package io.tutorial; import java.util.Scanner; public class Main { public static void main(String[] args) { int NAwal, NAkhir, Total; Scanner data = new Scanner(System.in); System.out.println(" PROGRAM MENGGUNAKAN FOR LOOP"); System.out.print(" Masuka Nilai Awal : "); NAwal = data.nextInt(); System.out.print(" Masukan Nilai Akhir : "); NAkhir = data.nextInt(); for (Total = 0;NAwal
@rendivs925
@rendivs925 2 жыл бұрын
import java.util.*; public class DoWhile { public static void main(String[] args) { Scanner inputUser; int nilaiAwal, nilaiAkhir, total; inputUser = new Scanner(System.in); System.out.print("nilai awal: "); nilaiAwal = inputUser.nextInt(); System.out.print("nilai akhir: "); nilaiAkhir = inputUser.nextInt(); total = 0; do { total = total + nilaiAwal; System.out.println("ditambah " + nilaiAwal + " menjadi " + total); nilaiAwal++; } while (nilaiAwal
@alfanmask6187
@alfanmask6187 5 жыл бұрын
Ini punya saya pak; ---------------------------------------------- package com.newbie; import java.util.Scanner; public class Main { public static void main(String[] args){ // Sum all of the aritmathic value (Sn) // #while loop int firstVal,lastVal,sum; Scanner userInput; userInput = new Scanner(System.in); System.out.print("First value : "); firstVal = userInput.nextInt(); System.out.print("Last value : "); lastVal = userInput.nextInt(); sum = 0; while(firstVal
@rendiyusuf7437
@rendiyusuf7437 4 жыл бұрын
System.out.print("Masukan Nilai Awal: "); int awal = sc.nextInt(); System.out.print("Masukan nilai akhir: "); int akhir = sc.nextInt(); // int total = 0; // while (awal
@saefulanasfitriantopo7263
@saefulanasfitriantopo7263 3 жыл бұрын
import java.util.*; public class LatihanLoop { public static void main(String[] args) { //program menjumlahkan angka dengan rentang // While(); // Dowhile(); For(); } private static void While() { int n_awal, n_akhir, total; Scanner masukScanner = new Scanner(System.in); System.out.println("Masukan nilai awal = "); n_awal = masukScanner.nextInt(); System.out.println("Masukan nilai akhir = "); n_akhir = masukScanner.nextInt(); total=0; while(n_awal
@hafidzahnurhasanah8788
@hafidzahnurhasanah8788 5 жыл бұрын
Kalo perulangannya nilai awalnya dikali 2 bentuknya jd gmn bang?
@fadhilfatih1588
@fadhilfatih1588 5 жыл бұрын
nilai++; nya diganti nilaiAwal= nilaiAwal*2;
@ST0RMZZY196
@ST0RMZZY196 6 жыл бұрын
bang setelah ini bikin pembelajaran android plz
@rakhabadur
@rakhabadur 5 жыл бұрын
Bang lu jadi dosen gua aja dah, dose gua gadanta soalnya wkwk
@mocriezaldy7587
@mocriezaldy7587 6 жыл бұрын
Kang, lagi baca2 documentnya "Scanner Java". Apakah emang harus menggunakan method "scanner.close();" kalau tdk pakai apakah ada efek nya?
@IPutuRakaWiratmaIIII
@IPutuRakaWiratmaIIII Жыл бұрын
baca dimana bang
@RudyStrom
@RudyStrom 6 жыл бұрын
bang saya bisa ngerjain pake do while
@ismailalfiyasin7794
@ismailalfiyasin7794 5 жыл бұрын
FOR //Latihan FOR loop membuat program penjumlahan angka dengan rentang System.out.println(" Program dengan FOR"); int a; int total = 0; for(a = 1; a
@hagoromootsutsuki1070
@hagoromootsutsuki1070 6 жыл бұрын
First
@sadamalfian9897
@sadamalfian9897 3 жыл бұрын
apakah video2 di channel ini boleh didownload dan dishare pak untuk teman2 yang kesulitan kuota?
@anandaannisasungkar867
@anandaannisasungkar867 2 жыл бұрын
permisi temen2 aku mau izin bertanya untuk total = 0 itu gunanya untuk apa ya? dan apakah itu harus selalu 0?
@wakeywakeyitstimeforschool
@wakeywakeyitstimeforschool Жыл бұрын
total = 0 fungsinya untuk assign value ke variabel. Karena sebelumnya cuma declare variable aja (int ..., total;), kamu juga komputer gak tau value dari total itu isinya berapa. Ketika totalnya tidak diassign valuenya, akan terjadi error pada looping pertama pada baris total = total + nilaiAwal; yang mana total pada ruas kanan adalah rancu, gak jelas isinya apa di sana. Jadi, total = 0 adalah untuk menjelaskan isi value dari variable total
@neryyatti6813
@neryyatti6813 4 жыл бұрын
package com.tutorial; import java.util.* ; public class Main { public static void main(String[] args) { // Latihan Loop Sederhana Scanner yukInput = new Scanner(System.in); int nilaiFirst, nilaiLast, awal, totalSkrg ; awal = 1 ; totalSkrg = 0 ; System.out.print("Masukkan nilai awal = "); nilaiFirst = yukInput.nextInt(); System.out.print("Masukkan nilai akhir = "); nilaiLast = yukInput.nextInt(); // System.out.println("======= C A R A F O R L O O P B Y N Y ======="); // for (; nilaiLast >= nilaiFirst ;){ // totalSkrg = totalSkrg + nilaiFirst++ ; // System.out.println("Total penjumlahan deret ke-" + awal + " adalah " + totalSkrg); // awal++ ; // } // System.out.println(" ======= C A R A D O W H I L E L O O P B Y N Y ======="); // boolean kondisi = true ; // kondisi = nilaiFirst nilaiLast) { // kondisi = false; // } // }while(kondisi); System.out.println(" ======= C A R A W H I L E L O O P B Y K E L A S T E R B U K A ======="); while (nilaiFirst
@kiipssmedia3291
@kiipssmedia3291 6 жыл бұрын
Bang minta email-nya dong.. mau bertanya lebih intens
@user-tb1it5md3j
@user-tb1it5md3j 3 жыл бұрын
IZIN KUMPUL TUGAS PAK, MOON MAAP TELAT 2 TAHUN, KARENA SAYA MABA. /** * Do While */ import java.util.Scanner; public class tugas { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Masukkan nilai awal = "); int awal = input.nextInt(); System.out.print("Masukkan nilai akhir = "); int akhir = input.nextInt(); int total=0; do { total+=awal; System.out.println("ditambah "+awal+" menjadi "+(total)); awal++; } while (awal
@rismaanelita194
@rismaanelita194 Жыл бұрын
import java.util.*; public class LatihanLoopSederhana { public static void main(String[] args) { //var dummy=yang nilainya berubah terus //program menjumlahakan angka dengan rentan int nilAwal, nilaiAkhir, total; Scanner inputUser = new Scanner (System.in); System.out.println("masukan nilai awal="); nilAwal = inputUser.nextInt(); System.out.println("masukan nilai akhir="); nilaiAkhir = inputUser.nextInt(); /* total=0; while(nilAwal
@rocirentama6880
@rocirentama6880 3 жыл бұрын
public static void main(String[] args) { Scanner inputUser =new Scanner(System.in); int nilaiawal = inputUser.nextInt(); int akhir = inputUser.nextInt(); int total = 0; do { total = total +nilaiawal; System.out.println(total); nilaiawal++; } while (nilaiawal
@lharun8320
@lharun8320 5 жыл бұрын
#
@mirzaali3058
@mirzaali3058 5 жыл бұрын
wtf iklan 4,29 detik gk bisa di skip
@mirzaali3058
@mirzaali3058 5 жыл бұрын
4 menit 29 detik maksudnya
@sahlianasitumorang9403
@sahlianasitumorang9403 5 жыл бұрын
201543500537 hadiiiiir
@iqballego
@iqballego 2 жыл бұрын
DO WHILE LOOP package com.tutorial; import java.util.Scanner; public class DoWhileLoop { public static void main (String[] args){ int awal,akhir,total; total = 0; boolean kondisi = true; Scanner inputUser = new Scanner (System.in); System.out.print("masukan nilai awal = "); awal = inputUser.nextInt(); System.out.print("masukan nilai akhir = "); akhir = inputUser.nextInt(); do { total = total + awal; System.out.println(" ditambah " + awal + " = " + total); awal++; if (awal > akhir){ kondisi = false; } } while (kondisi); } } FOR LOOP package com.tutorial; import java.util.Scanner; public class ForLoop { public static void main(String[] args){ int awal,akhir,total; Scanner inputUser = new Scanner (System.in); total = 0; System.out.print("masukan nilai awal = "); awal = inputUser.nextInt(); System.out.print("masukan nilai akhir = "); akhir = inputUser.nextInt(); for (; awal
@atrasyahza801
@atrasyahza801 2 жыл бұрын
permisi bang mau setoran tugas nih mohon koreksinya Terimakasih sehat selalu berkah selalu bang package com.tutorial; import java.util.*; public class main { public static void main(String[] args){ // program untuk menjumlahkan angka dengan rentang System.out.println("menggunakan WHILE"); int nilaiAwal, nilaiAkhir, total; Scanner inputUser = new Scanner(System.in); System.out.println("nilai awal ="); nilaiAwal = inputUser.nextInt(); System.out.println("nilai Akhir ="); nilaiAkhir = inputUser.nextInt(); total = 0; while (nilaiAwal
@danyajysajywo6624
@danyajysajywo6624 3 жыл бұрын
package Tugas; import java.util.*; public class PR { public static void main(String[]args){ System.out.println("menjumlahkan angka rentang menggunakan do while"); int nilaiAwal,nilaiAkhir,Total; Scanner inputUser = new Scanner (System.in); System.out.println("Masukan nilai awal = "); nilaiAwal = inputUser.nextInt(); System.out.println("masukan nilai akhir = "); nilaiAkhir = inputUser.nextInt(); Total = 0; do{ Total = Total + nilaiAwal; System.out.println("ditambah " + nilaiAwal + " menjadi " + Total); nilaiAwal++; }while (nilaiAwal
Belajar Java [Dasar] - 31 - Latihan Looping deret Fibonacci
14:43
Kelas Terbuka
Рет қаралды 36 М.
Tutorial TypeScript Dasar (Bahasa Indonesia)
2:44:51
Programmer Zaman Now
Рет қаралды 87 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 14 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 17 МЛН
Java For Beginners: While, Do While & For Loops (7/10)
10:59
Codecourse
Рет қаралды 478 М.
Belajar Java [Dasar] - 36 - Latihan Fungsi, menghitung dan menggambar
16:42
Belajar Dasar Pemrograman Javascript - Looping
10:51
Dea Afrizal
Рет қаралды 31 М.
While Loop Java Tutorial #37
8:51
Alex Lee
Рет қаралды 323 М.
Belajar Java [Dasar] - 20 - If Else Statement
12:48
Kelas Terbuka
Рет қаралды 55 М.
Belajar Java [Dasar] - 33 - Looping Bersarang (Kotak dan Segitiga)
12:26
Java for loop ➰
4:10
Bro Code
Рет қаралды 111 М.
Masalah N+1 Query
18:10
Programmer Zaman Now
Рет қаралды 18 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 14 МЛН