SlideShare a Scribd company logo
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);
}
}

More Related Content

What's hot

クイズプログラム
クイズプログラムクイズプログラム
クイズプログラム
Minori Fukuda
 
Collection Core Concept
Collection Core ConceptCollection Core Concept
Collection Core Concept
Rays Technologies
 
Studyx4
Studyx4Studyx4
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
Naresha K
 
Unit testing patterns for concurrent code
Unit testing patterns for concurrent codeUnit testing patterns for concurrent code
Unit testing patterns for concurrent code
Dror Helper
 
Studyx1
Studyx1Studyx1
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 Toolkit
Chris Oldwood
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
ferney1428
 
JDBC Core Concept
JDBC Core ConceptJDBC Core Concept
JDBC Core Concept
Rays Technologies
 
Spotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the AftermathSpotify 2016 - Beyond Lambdas - the Aftermath
Spotify 2016 - Beyond Lambdas - the Aftermath
Daniel Sawano
 
Studyx2
Studyx2Studyx2
JDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the AftermathJDays 2016 - Beyond Lambdas - the Aftermath
JDays 2016 - Beyond Lambdas - the Aftermath
Daniel Sawano
 
Collections Framework
Collections FrameworkCollections Framework
Collections Framework
Sunil 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
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
Dr.M.Karthika parthasarathy
 

What's hot (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
 

Viewers also liked

Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
Многообразие мобильных платформ — что стоит использовать в зависимости от зад...
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 Processing
ijsrd.com
 
Solitaire full article
Solitaire full articleSolitaire full article
Solitaire full articleJennifer Trask
 

Viewers also liked (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
 

Similar to 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.pdf
anurag1231
 
Computer java programs
Computer java programsComputer java programs
Computer java programs
ADITYA 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.pdf
eyewatchsystems
 
Code
CodeCode
Code
Ray Ray
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iii
Niraj 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; .pdf
aryan9007
 
Java practical
Java practicalJava practical
Java practical
william otto
 
Java programs
Java programsJava 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
optokunal1
 
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
anjanacottonmills
 
Lab4
Lab4Lab4
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..pdf
irshadoptical
 
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
deepakangel
 
QA Auotmation Java programs,theory
QA Auotmation Java programs,theory QA Auotmation Java programs,theory
QA Auotmation Java programs,theory
archana singh
 
Driver class
Driver classDriver class
Driver class
VenkatRaoJ
 

Similar to 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
 

More from Ray Ray

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

More from 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
 

Recently uploaded

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 

Recently uploaded (20)

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 

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); } }