SlideShare ist ein Scribd-Unternehmen logo
1 von 3
import java.util.Scanner;
public class Soal07
{
public static void main(String[] Args)
{
int jumlah=0,i=0,nilai[]={0,0,0,0,0},flag,jawab=0,no=0;
String namaKelas,namaMhs[]={"","","","",""},nim[]={"","","","",""};
Scanner input = new Scanner(System.in);
Scanner inputInt = new Scanner(System.in);
do{
System.out.println(" Student Mark List");
System.out.println("n1. Input Student");
System.out.println("2. See All Data");
System.out.println("3. Edit Data");
System.out.println("4. Exit");
do{
flag=0;
try
{
System.out.print("nInput Your Choice [1-4] ? ");
jawab = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("nWrong Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || jawab>4 || jawab<1);
if(jawab==1)
{
do{
flag=0;
try
{
System.out.print("nHow many student [1-5] ?
");
jumlah = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("nWrong Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || jumlah>5 || jumlah<1);
System.out.println("nPlease input data of " + jumlah +
" people");
for(i=0;i<jumlah;i++)
{
System.out.print("n" + (i+1));
do{
System.out.print(" Please input Student Id
[10]= ");
nim[i] = input.nextLine();
}while(nim[i].length()!=10);
System.out.print(" Please input Student Name =
");
namaMhs[i] = input.nextLine();
do{
flag=0;
try
{
System.out.print(" Please input
Student Mark [0-100] = ");
nilai[i] = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("n Wrong
Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || nilai[i]>100 || nilai[i]<0);
}
}
else if(jawab==2)
{
if(jumlah!=0)
{
System.out.println("nThere is already " + jumlah
+ " data");
for(i=0;i<jumlah;i++)
{
System.out.println((i+1) + ". " +
namaMhs[i]);
}
do{
System.out.print("nPlease input student no
[1-" + jumlah + "] ? ");
flag=0;
try
{
no = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("nWrong
Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || no>jumlah || no<1);
System.out.println("nStudent with No " + no + "
is");
System.out.println("Student ID = " + nim[no-
1]);
System.out.println("Student Name = " +
namaMhs[no-1]);
System.out.println("Mark = " + nilai[no-
1]);
}
}
else if(jawab==3)
{
if(jumlah!=0)
{
System.out.println("nThere is already " + jumlah
+ " data");
do{
System.out.print("nPlease input student no
[1-" + jumlah + "] ? ");
flag=0;
try
{
no = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("nWrong
Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || no>jumlah || no<1);
System.out.println("nStudent with No " + no + "
is");
System.out.println("Student ID = " + nim[no-
1]);
System.out.println("Student Name = " +
namaMhs[no-1]);
System.out.println("Mark = " + nilai[no-
1]);
do{
System.out.print("nPlease input Student ID
[10]= ");
nim[no-1] = input.nextLine();
}while(nim[no-1].length()!=10);
System.out.print("Please input Student Name = ");
namaMhs[no-1] = input.nextLine();
do{
flag=0;
try
{
System.out.print("Please input Student
Mark [0-100] = ");
nilai[no-1] = inputInt.nextInt();
}
catch(Exception e)
{
System.out.println("n Wrong
Input!n");
inputInt.nextLine();
flag=1;
}
}while(flag==1 || nilai[no-1]>100 || nilai[no-
1]<0);
}
}
System.out.println("nnn");
}while(jawab!=4);
}
}

Weitere ähnliche Inhalte

Was ist angesagt?

クイズプログラム
クイズプログラムクイズプログラム
クイズプログラムMinori Fukuda
 
Evolving with Java - How to Remain Effective
Evolving with Java - How to Remain EffectiveEvolving with Java - How to Remain Effective
Evolving with Java - How to Remain EffectiveNaresha K
 
Unit testing patterns for concurrent code
Unit testing patterns for concurrent codeUnit testing patterns for concurrent code
Unit testing patterns for concurrent codeDror Helper
 
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...Naresha K
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitChris Oldwood
 
Spotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the AftermathSpotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the AftermathDaniel Sawano
 
JDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the AftermathJDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the AftermathDaniel Sawano
 
Collections Framework
Collections FrameworkCollections Framework
Collections FrameworkSunil OS
 
ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)David Rodenas
 

Was ist angesagt? (18)

クイズプログラム
クイズプログラムクイズプログラム
クイズプログラム
 
Collection Core Concept
Collection Core ConceptCollection Core Concept
Collection Core Concept
 
Studyx4
Studyx4Studyx4
Studyx4
 
Evolving with Java - How to Remain Effective
Evolving with Java - How to Remain EffectiveEvolving with Java - How to Remain Effective
Evolving with Java - How to Remain Effective
 
Unit testing patterns for concurrent code
Unit testing patterns for concurrent codeUnit testing patterns for concurrent code
Unit testing patterns for concurrent code
 
Studyx1
Studyx1Studyx1
Studyx1
 
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...Eclipse Collections, Java Streams & Vavr - What's in them for  Functional Pro...
Eclipse Collections, Java Streams & Vavr - What's in them for Functional Pro...
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing Toolkit
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
 
Ann
AnnAnn
Ann
 
JDBC Core Concept
JDBC Core ConceptJDBC Core Concept
JDBC Core Concept
 
Spotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the AftermathSpotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the Aftermath
 
Studyx2
Studyx2Studyx2
Studyx2
 
JDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the AftermathJDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the Aftermath
 
Insertion Sort Code
Insertion Sort CodeInsertion Sort Code
Insertion Sort Code
 
Collections Framework
Collections FrameworkCollections Framework
Collections Framework
 
ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)ES3-2020-06 Test Driven Development (TDD)
ES3-2020-06 Test Driven Development (TDD)
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 

Andere mochten auch

Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...Anna Dvornikova
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled PresentationThomasCawdron
 
Information Security using Cryptography and Image Processing
Information Security using Cryptography and Image ProcessingInformation Security using Cryptography and Image Processing
Information Security using Cryptography and Image Processingijsrd.com
 
Solitaire full article
Solitaire full articleSolitaire full article
Solitaire full articleJennifer Trask
 

Andere mochten auch (6)

Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Information Security using Cryptography and Image Processing
Information Security using Cryptography and Image ProcessingInformation Security using Cryptography and Image Processing
Information Security using Cryptography and Image Processing
 
01 ble intro
01 ble intro01 ble intro
01 ble intro
 
Solitaire full article
Solitaire full articleSolitaire full article
Solitaire full article
 
Bulbul singh
Bulbul singhBulbul singh
Bulbul singh
 

Ähnlich wie Code javascript

CODEimport java.util.; public class test { public static voi.pdf
CODEimport java.util.; public class test { public static voi.pdfCODEimport java.util.; public class test { public static voi.pdf
CODEimport java.util.; public class test { public static voi.pdfanurag1231
 
Computer java programs
Computer java programsComputer java programs
Computer java programsADITYA BHARTI
 
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdfJava AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdfeyewatchsystems
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iiiNiraj Bharambe
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Ayes Chinmay
 
mport java.io.; class Student { int rollno; String name; .pdf
mport java.io.; class Student { int rollno; String name; .pdfmport java.io.; class Student { int rollno; String name; .pdf
mport java.io.; class Student { int rollno; String name; .pdfaryan9007
 
import java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdfimport java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdfoptokunal1
 
MagicSquareTest.java import java.util.Scanner;public class Mag.pdf
MagicSquareTest.java import java.util.Scanner;public class Mag.pdfMagicSquareTest.java import java.util.Scanner;public class Mag.pdf
MagicSquareTest.java import java.util.Scanner;public class Mag.pdfanjanacottonmills
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...MaruMengesha
 
Java Assignment.Implement a binary search algorithm on an array..pdf
Java Assignment.Implement a binary search algorithm on an array..pdfJava Assignment.Implement a binary search algorithm on an array..pdf
Java Assignment.Implement a binary search algorithm on an array..pdfirshadoptical
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfdeepakangel
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory archana singh
 

Ähnlich wie Code javascript (20)

CODEimport java.util.; public class test { public static voi.pdf
CODEimport java.util.; public class test { public static voi.pdfCODEimport java.util.; public class test { public static voi.pdf
CODEimport java.util.; public class test { public static voi.pdf
 
Java programs
Java programsJava programs
Java programs
 
Computer java programs
Computer java programsComputer java programs
Computer java programs
 
Java file
Java fileJava file
Java file
 
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdfJava AssignmentWrite a program using sortingsorting bubble,sele.pdf
Java AssignmentWrite a program using sortingsorting bubble,sele.pdf
 
Code
CodeCode
Code
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iii
 
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
Internet and Web Technology (CLASS-16) [Basic Elements of Java Program] | NIC...
 
mport java.io.; class Student { int rollno; String name; .pdf
mport java.io.; class Student { int rollno; String name; .pdfmport java.io.; class Student { int rollno; String name; .pdf
mport java.io.; class Student { int rollno; String name; .pdf
 
Java practical
Java practicalJava practical
Java practical
 
Java programs
Java programsJava programs
Java programs
 
import java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdfimport java.util.;public class Program{public static void.pdf
import java.util.;public class Program{public static void.pdf
 
MagicSquareTest.java import java.util.Scanner;public class Mag.pdf
MagicSquareTest.java import java.util.Scanner;public class Mag.pdfMagicSquareTest.java import java.util.Scanner;public class Mag.pdf
MagicSquareTest.java import java.util.Scanner;public class Mag.pdf
 
Lab4
Lab4Lab4
Lab4
 
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
WINSEM2020-21_STS3105_SS_VL2020210500169_Reference_Material_I_15-Feb-2021_L6-...
 
Java Assignment.Implement a binary search algorithm on an array..pdf
Java Assignment.Implement a binary search algorithm on an array..pdfJava Assignment.Implement a binary search algorithm on an array..pdf
Java Assignment.Implement a binary search algorithm on an array..pdf
 
Java practical
Java practicalJava practical
Java practical
 
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdfFactors.javaimport java.io.; import java.util.Scanner; class .pdf
Factors.javaimport java.io.; import java.util.Scanner; class .pdf
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory
 
Driver class
Driver classDriver class
Driver class
 

Mehr von Ray Ray

Laporan Counting Grade Apps
Laporan Counting Grade AppsLaporan Counting Grade Apps
Laporan Counting Grade AppsRay Ray
 

Mehr von Ray Ray (7)

Booklab
BooklabBooklab
Booklab
 
Booklab
BooklabBooklab
Booklab
 
Booklab
BooklabBooklab
Booklab
 
Code
CodeCode
Code
 
Code
CodeCode
Code
 
Code
CodeCode
Code
 
Laporan Counting Grade Apps
Laporan Counting Grade AppsLaporan Counting Grade Apps
Laporan Counting Grade Apps
 

Kürzlich hochgeladen

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Kürzlich hochgeladen (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Code javascript

  • 1. import java.util.Scanner; public class Soal07 { public static void main(String[] Args) { int jumlah=0,i=0,nilai[]={0,0,0,0,0},flag,jawab=0,no=0; String namaKelas,namaMhs[]={"","","","",""},nim[]={"","","","",""}; Scanner input = new Scanner(System.in); Scanner inputInt = new Scanner(System.in); do{ System.out.println(" Student Mark List"); System.out.println("n1. Input Student"); System.out.println("2. See All Data"); System.out.println("3. Edit Data"); System.out.println("4. Exit"); do{ flag=0; try { System.out.print("nInput Your Choice [1-4] ? "); jawab = inputInt.nextInt(); } catch(Exception e) { System.out.println("nWrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || jawab>4 || jawab<1); if(jawab==1) { do{ flag=0; try { System.out.print("nHow many student [1-5] ? "); jumlah = inputInt.nextInt(); } catch(Exception e) { System.out.println("nWrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || jumlah>5 || jumlah<1); System.out.println("nPlease input data of " + jumlah + " people"); for(i=0;i<jumlah;i++) { System.out.print("n" + (i+1)); do{ System.out.print(" Please input Student Id [10]= "); nim[i] = input.nextLine(); }while(nim[i].length()!=10); System.out.print(" Please input Student Name = "); namaMhs[i] = input.nextLine();
  • 2. do{ flag=0; try { System.out.print(" Please input Student Mark [0-100] = "); nilai[i] = inputInt.nextInt(); } catch(Exception e) { System.out.println("n Wrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || nilai[i]>100 || nilai[i]<0); } } else if(jawab==2) { if(jumlah!=0) { System.out.println("nThere is already " + jumlah + " data"); for(i=0;i<jumlah;i++) { System.out.println((i+1) + ". " + namaMhs[i]); } do{ System.out.print("nPlease input student no [1-" + jumlah + "] ? "); flag=0; try { no = inputInt.nextInt(); } catch(Exception e) { System.out.println("nWrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || no>jumlah || no<1); System.out.println("nStudent with No " + no + " is"); System.out.println("Student ID = " + nim[no- 1]); System.out.println("Student Name = " + namaMhs[no-1]); System.out.println("Mark = " + nilai[no- 1]); } } else if(jawab==3) { if(jumlah!=0) { System.out.println("nThere is already " + jumlah + " data"); do{ System.out.print("nPlease input student no [1-" + jumlah + "] ? ");
  • 3. flag=0; try { no = inputInt.nextInt(); } catch(Exception e) { System.out.println("nWrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || no>jumlah || no<1); System.out.println("nStudent with No " + no + " is"); System.out.println("Student ID = " + nim[no- 1]); System.out.println("Student Name = " + namaMhs[no-1]); System.out.println("Mark = " + nilai[no- 1]); do{ System.out.print("nPlease input Student ID [10]= "); nim[no-1] = input.nextLine(); }while(nim[no-1].length()!=10); System.out.print("Please input Student Name = "); namaMhs[no-1] = input.nextLine(); do{ flag=0; try { System.out.print("Please input Student Mark [0-100] = "); nilai[no-1] = inputInt.nextInt(); } catch(Exception e) { System.out.println("n Wrong Input!n"); inputInt.nextLine(); flag=1; } }while(flag==1 || nilai[no-1]>100 || nilai[no- 1]<0); } } System.out.println("nnn"); }while(jawab!=4); } }