SlideShare a Scribd company logo
1 of 1
Download to read offline
Lab1.java
import java.util.Scanner;//package
public class Lab1 {//main class
public static void main(String[] args) {//main method
// TODO Auto-generated method stub
int number,i,numbersuplied;//instance variables
Scanner keyboard= new Scanner(System.in);
System.out.println("Please enter an number");
numbersuplied= keyboard.nextInt();//key board inputting
//logic for next prime
for(number=numbersuplied+1;;number++)
{
for(i=2;i
Solution
Lab1.java
import java.util.Scanner;//package
public class Lab1 {//main class
public static void main(String[] args) {//main method
// TODO Auto-generated method stub
int number,i,numbersuplied;//instance variables
Scanner keyboard= new Scanner(System.in);
System.out.println("Please enter an number");
numbersuplied= keyboard.nextInt();//key board inputting
//logic for next prime
for(number=numbersuplied+1;;number++)
{
for(i=2;i

More Related Content

Similar to Lab1.javaimport java.util.Scanner;package public class Lab1 .pdf

Similar to Lab1.javaimport java.util.Scanner;package public class Lab1 .pdf (19)

java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
import java.util.Scanner;public class Factorial { method usi.pdf
import java.util.Scanner;public class Factorial { method usi.pdfimport java.util.Scanner;public class Factorial { method usi.pdf
import java.util.Scanner;public class Factorial { method usi.pdf
 
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
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Java programs
Java programsJava programs
Java programs
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1
 
Java 5 and 6 New Features
Java 5 and 6 New FeaturesJava 5 and 6 New Features
Java 5 and 6 New Features
 
Trabajo
TrabajoTrabajo
Trabajo
 
Anjalisoorej imca133 assignment
Anjalisoorej imca133 assignmentAnjalisoorej imca133 assignment
Anjalisoorej imca133 assignment
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
Codeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdfCodeimport java.util.Random; import java.util.Scanner;public .pdf
Codeimport java.util.Random; import java.util.Scanner;public .pdf
 
Basic java, java collection Framework and Date Time API
Basic java, java collection Framework and Date Time APIBasic java, java collection Framework and Date Time API
Basic java, java collection Framework and Date Time API
 
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
 
DS LAB RECORD.docx
DS LAB RECORD.docxDS LAB RECORD.docx
DS LAB RECORD.docx
 

More from anupamselection

There are some general processes which you need to follow while crea.pdf
There are some general processes which you need to follow while crea.pdfThere are some general processes which you need to follow while crea.pdf
There are some general processes which you need to follow while crea.pdf
anupamselection
 
Ques-1A keystone species is defined as a species, which has an ex.pdf
Ques-1A keystone species is defined as a species, which has an ex.pdfQues-1A keystone species is defined as a species, which has an ex.pdf
Ques-1A keystone species is defined as a species, which has an ex.pdf
anupamselection
 
package length; A Length is an object that has a length and .pdf
package length; A Length is an object that has a length and .pdfpackage length; A Length is an object that has a length and .pdf
package length; A Length is an object that has a length and .pdf
anupamselection
 
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdfName used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
anupamselection
 
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdf
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdfMonthly interest rate=1212=1Present value(PV) of monthly payment.pdf
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdf
anupamselection
 
In this module, you will learn some basics about operating in Object.pdf
In this module, you will learn some basics about operating in Object.pdfIn this module, you will learn some basics about operating in Object.pdf
In this module, you will learn some basics about operating in Object.pdf
anupamselection
 

More from anupamselection (20)

1. D2. A3. D4.DSolution1. D2. A3. D4.D.pdf
1. D2. A3. D4.DSolution1. D2. A3. D4.D.pdf1. D2. A3. D4.DSolution1. D2. A3. D4.D.pdf
1. D2. A3. D4.DSolution1. D2. A3. D4.D.pdf
 
1) pH is alkalotic and it is caused due to combined (mixed) alkalosi.pdf
1) pH is alkalotic and it is caused due to combined (mixed) alkalosi.pdf1) pH is alkalotic and it is caused due to combined (mixed) alkalosi.pdf
1) pH is alkalotic and it is caused due to combined (mixed) alkalosi.pdf
 
1) Economical for transport of goods and services2) Reducing traff.pdf
1) Economical for transport of goods and services2) Reducing traff.pdf1) Economical for transport of goods and services2) Reducing traff.pdf
1) Economical for transport of goods and services2) Reducing traff.pdf
 
There are some general processes which you need to follow while crea.pdf
There are some general processes which you need to follow while crea.pdfThere are some general processes which you need to follow while crea.pdf
There are some general processes which you need to follow while crea.pdf
 
All of the above.Solution All of the above..pdf
 All of the above.Solution All of the above..pdf All of the above.Solution All of the above..pdf
All of the above.Solution All of the above..pdf
 
Ques-1A keystone species is defined as a species, which has an ex.pdf
Ques-1A keystone species is defined as a species, which has an ex.pdfQues-1A keystone species is defined as a species, which has an ex.pdf
Ques-1A keystone species is defined as a species, which has an ex.pdf
 
PO42- is produced when CaPO4 is dissolved. Adding acid to the soluti.pdf
PO42- is produced when CaPO4 is dissolved. Adding acid to the soluti.pdfPO42- is produced when CaPO4 is dissolved. Adding acid to the soluti.pdf
PO42- is produced when CaPO4 is dissolved. Adding acid to the soluti.pdf
 
picture(figure) is not clearSolutionpicture(figure) is not cle.pdf
picture(figure) is not clearSolutionpicture(figure) is not cle.pdfpicture(figure) is not clearSolutionpicture(figure) is not cle.pdf
picture(figure) is not clearSolutionpicture(figure) is not cle.pdf
 
package length; A Length is an object that has a length and .pdf
package length; A Length is an object that has a length and .pdfpackage length; A Length is an object that has a length and .pdf
package length; A Length is an object that has a length and .pdf
 
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdfName used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
Name used on OSIName Used in TCPIP networksLayer 1(Physical)L.pdf
 
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdf
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdfMonthly interest rate=1212=1Present value(PV) of monthly payment.pdf
Monthly interest rate=1212=1Present value(PV) of monthly payment.pdf
 
Interest coverage=EBITinterest expensewhich is equal to=(40020.pdf
Interest coverage=EBITinterest expensewhich is equal to=(40020.pdfInterest coverage=EBITinterest expensewhich is equal to=(40020.pdf
Interest coverage=EBITinterest expensewhich is equal to=(40020.pdf
 
In this module, you will learn some basics about operating in Object.pdf
In this module, you will learn some basics about operating in Object.pdfIn this module, you will learn some basics about operating in Object.pdf
In this module, you will learn some basics about operating in Object.pdf
 
y = 12 x=0 z=0 .pdf
                     y = 12 x=0 z=0                                  .pdf                     y = 12 x=0 z=0                                  .pdf
y = 12 x=0 z=0 .pdf
 
When comparing the R groups of these to amino aci.pdf
                     When comparing the R groups of these to amino aci.pdf                     When comparing the R groups of these to amino aci.pdf
When comparing the R groups of these to amino aci.pdf
 
Malonic Acid Water Soluble Methyl Alcohol Solu.pdf
                     Malonic Acid  Water Soluble Methyl Alcohol Solu.pdf                     Malonic Acid  Water Soluble Methyl Alcohol Solu.pdf
Malonic Acid Water Soluble Methyl Alcohol Solu.pdf
 
It is true that ionization energy is required to .pdf
                     It is true that ionization energy is required to .pdf                     It is true that ionization energy is required to .pdf
It is true that ionization energy is required to .pdf
 
Ionic compounds form when the electronegativity d.pdf
                     Ionic compounds form when the electronegativity d.pdf                     Ionic compounds form when the electronegativity d.pdf
Ionic compounds form when the electronegativity d.pdf
 
If R is reflexive, then xRy means yRx; but then, .pdf
                     If R is reflexive, then xRy means yRx; but then, .pdf                     If R is reflexive, then xRy means yRx; but then, .pdf
If R is reflexive, then xRy means yRx; but then, .pdf
 
H2O HBr H2 due to hydrogen bonding and then .pdf
                     H2O  HBr  H2  due to hydrogen bonding and then .pdf                     H2O  HBr  H2  due to hydrogen bonding and then .pdf
H2O HBr H2 due to hydrogen bonding and then .pdf
 

Recently uploaded

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
QucHHunhnh
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
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
 
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...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
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
 
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
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Lab1.javaimport java.util.Scanner;package public class Lab1 .pdf

  • 1. Lab1.java import java.util.Scanner;//package public class Lab1 {//main class public static void main(String[] args) {//main method // TODO Auto-generated method stub int number,i,numbersuplied;//instance variables Scanner keyboard= new Scanner(System.in); System.out.println("Please enter an number"); numbersuplied= keyboard.nextInt();//key board inputting //logic for next prime for(number=numbersuplied+1;;number++) { for(i=2;i Solution Lab1.java import java.util.Scanner;//package public class Lab1 {//main class public static void main(String[] args) {//main method // TODO Auto-generated method stub int number,i,numbersuplied;//instance variables Scanner keyboard= new Scanner(System.in); System.out.println("Please enter an number"); numbersuplied= keyboard.nextInt();//key board inputting //logic for next prime for(number=numbersuplied+1;;number++) { for(i=2;i