SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
Lab06_C: Write a Java program (using Method) that will accept a number as input from the
keyboard and calculate the Cube of a number. (1) If num is less than 0 then the program should
print "Number cannot be less than 0" and the program will end. (2) if num is equal or greater than
0 then the program should use a Method to calculate and print out the Cube as follows: The
formula to calculate

Weitere Àhnliche Inhalte

Mehr von adityacommunication1

label the following structures if they are visible on the im.pdf
label the following structures if they are visible on the im.pdflabel the following structures if they are visible on the im.pdf
label the following structures if they are visible on the im.pdfadityacommunication1
 
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
Lab8  Controlling traffic using Extended ACL Objectives Per.pdfLab8  Controlling traffic using Extended ACL Objectives Per.pdf
Lab8 Controlling traffic using Extended ACL Objectives Per.pdfadityacommunication1
 
Lab Task 2 Use the below code and fill it in where appropri.pdf
Lab Task 2 Use the below code and fill it in where appropri.pdfLab Task 2 Use the below code and fill it in where appropri.pdf
Lab Task 2 Use the below code and fill it in where appropri.pdfadityacommunication1
 
Lab Task 5 Points As a programmer in a company you were .pdf
Lab Task 5 Points As a programmer in a company you were .pdfLab Task 5 Points As a programmer in a company you were .pdf
Lab Task 5 Points As a programmer in a company you were .pdfadityacommunication1
 
La mutacin del ojo sepia se es una mutacin recesiva no l.pdf
La mutacin del ojo sepia se es una mutacin recesiva no l.pdfLa mutacin del ojo sepia se es una mutacin recesiva no l.pdf
La mutacin del ojo sepia se es una mutacin recesiva no l.pdfadityacommunication1
 
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdf
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdfLAB EXERCISES 1 Create a table employee with emp_noemp_n.pdf
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdfadityacommunication1
 
lab 7 volcanos Emaglai St Maina kea and whata Use these map.pdf
lab 7 volcanos  Emaglai St Maina kea and whata Use these map.pdflab 7 volcanos  Emaglai St Maina kea and whata Use these map.pdf
lab 7 volcanos Emaglai St Maina kea and whata Use these map.pdfadityacommunication1
 
La venta al por menor de prendas de vestir ha cambiado Ya n.pdf
La venta al por menor de prendas de vestir ha cambiado Ya n.pdfLa venta al por menor de prendas de vestir ha cambiado Ya n.pdf
La venta al por menor de prendas de vestir ha cambiado Ya n.pdfadityacommunication1
 
La Universidad Johns Hopkins cometi recientemente un gran e.pdf
La Universidad Johns Hopkins cometi recientemente un gran e.pdfLa Universidad Johns Hopkins cometi recientemente un gran e.pdf
La Universidad Johns Hopkins cometi recientemente un gran e.pdfadityacommunication1
 
La transcripcin es el proceso mediante el cual la enzima _.pdf
La transcripcin es el proceso mediante el cual la enzima _.pdfLa transcripcin es el proceso mediante el cual la enzima _.pdf
La transcripcin es el proceso mediante el cual la enzima _.pdfadityacommunication1
 
La ventaja potencial de la dilucin de acciones es que R E.pdf
La ventaja potencial de la dilucin de acciones es que R E.pdfLa ventaja potencial de la dilucin de acciones es que R E.pdf
La ventaja potencial de la dilucin de acciones es que R E.pdfadityacommunication1
 
La transcriptasa inversa es conocida por tener poca activida.pdf
La transcriptasa inversa es conocida por tener poca activida.pdfLa transcriptasa inversa es conocida por tener poca activida.pdf
La transcriptasa inversa es conocida por tener poca activida.pdfadityacommunication1
 
La teora del orden jerrquico de MyersMajluf predice que l.pdf
La teora del orden jerrquico de MyersMajluf predice que l.pdfLa teora del orden jerrquico de MyersMajluf predice que l.pdf
La teora del orden jerrquico de MyersMajluf predice que l.pdfadityacommunication1
 
La toma de decisiones no rutinarias que se produce en respue.pdf
La toma de decisiones no rutinarias que se produce en respue.pdfLa toma de decisiones no rutinarias que se produce en respue.pdf
La toma de decisiones no rutinarias que se produce en respue.pdfadityacommunication1
 
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdf
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdfLa tecnologa avanza rpidamente en muchos Servicios de Apoy.pdf
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdfadityacommunication1
 
La teora de los fondos prestables del inters muestra que l.pdf
La teora de los fondos prestables del inters muestra que l.pdfLa teora de los fondos prestables del inters muestra que l.pdf
La teora de los fondos prestables del inters muestra que l.pdfadityacommunication1
 
La Revolucin Industrial fue un factor en una explosin demo.pdf
La Revolucin Industrial fue un factor en una explosin demo.pdfLa Revolucin Industrial fue un factor en una explosin demo.pdf
La Revolucin Industrial fue un factor en una explosin demo.pdfadityacommunication1
 
La reproduccin en uno de los siguientes rdenes implica el .pdf
La reproduccin en uno de los siguientes rdenes implica el .pdfLa reproduccin en uno de los siguientes rdenes implica el .pdf
La reproduccin en uno de los siguientes rdenes implica el .pdfadityacommunication1
 
La responsabilidad es clara Hay ventajas de ahorro de cost.pdf
La responsabilidad es clara  Hay ventajas de ahorro de cost.pdfLa responsabilidad es clara  Hay ventajas de ahorro de cost.pdf
La responsabilidad es clara Hay ventajas de ahorro de cost.pdfadityacommunication1
 
La principal diferencia entre los mtodos de pago y compr.pdf
La principal diferencia entre los mtodos de pago y compr.pdfLa principal diferencia entre los mtodos de pago y compr.pdf
La principal diferencia entre los mtodos de pago y compr.pdfadityacommunication1
 

Mehr von adityacommunication1 (20)

label the following structures if they are visible on the im.pdf
label the following structures if they are visible on the im.pdflabel the following structures if they are visible on the im.pdf
label the following structures if they are visible on the im.pdf
 
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
Lab8  Controlling traffic using Extended ACL Objectives Per.pdfLab8  Controlling traffic using Extended ACL Objectives Per.pdf
Lab8 Controlling traffic using Extended ACL Objectives Per.pdf
 
Lab Task 2 Use the below code and fill it in where appropri.pdf
Lab Task 2 Use the below code and fill it in where appropri.pdfLab Task 2 Use the below code and fill it in where appropri.pdf
Lab Task 2 Use the below code and fill it in where appropri.pdf
 
Lab Task 5 Points As a programmer in a company you were .pdf
Lab Task 5 Points As a programmer in a company you were .pdfLab Task 5 Points As a programmer in a company you were .pdf
Lab Task 5 Points As a programmer in a company you were .pdf
 
La mutacin del ojo sepia se es una mutacin recesiva no l.pdf
La mutacin del ojo sepia se es una mutacin recesiva no l.pdfLa mutacin del ojo sepia se es una mutacin recesiva no l.pdf
La mutacin del ojo sepia se es una mutacin recesiva no l.pdf
 
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdf
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdfLAB EXERCISES 1 Create a table employee with emp_noemp_n.pdf
LAB EXERCISES 1 Create a table employee with emp_noemp_n.pdf
 
lab 7 volcanos Emaglai St Maina kea and whata Use these map.pdf
lab 7 volcanos  Emaglai St Maina kea and whata Use these map.pdflab 7 volcanos  Emaglai St Maina kea and whata Use these map.pdf
lab 7 volcanos Emaglai St Maina kea and whata Use these map.pdf
 
La venta al por menor de prendas de vestir ha cambiado Ya n.pdf
La venta al por menor de prendas de vestir ha cambiado Ya n.pdfLa venta al por menor de prendas de vestir ha cambiado Ya n.pdf
La venta al por menor de prendas de vestir ha cambiado Ya n.pdf
 
La Universidad Johns Hopkins cometi recientemente un gran e.pdf
La Universidad Johns Hopkins cometi recientemente un gran e.pdfLa Universidad Johns Hopkins cometi recientemente un gran e.pdf
La Universidad Johns Hopkins cometi recientemente un gran e.pdf
 
La transcripcin es el proceso mediante el cual la enzima _.pdf
La transcripcin es el proceso mediante el cual la enzima _.pdfLa transcripcin es el proceso mediante el cual la enzima _.pdf
La transcripcin es el proceso mediante el cual la enzima _.pdf
 
La ventaja potencial de la dilucin de acciones es que R E.pdf
La ventaja potencial de la dilucin de acciones es que R E.pdfLa ventaja potencial de la dilucin de acciones es que R E.pdf
La ventaja potencial de la dilucin de acciones es que R E.pdf
 
La transcriptasa inversa es conocida por tener poca activida.pdf
La transcriptasa inversa es conocida por tener poca activida.pdfLa transcriptasa inversa es conocida por tener poca activida.pdf
La transcriptasa inversa es conocida por tener poca activida.pdf
 
La teora del orden jerrquico de MyersMajluf predice que l.pdf
La teora del orden jerrquico de MyersMajluf predice que l.pdfLa teora del orden jerrquico de MyersMajluf predice que l.pdf
La teora del orden jerrquico de MyersMajluf predice que l.pdf
 
La toma de decisiones no rutinarias que se produce en respue.pdf
La toma de decisiones no rutinarias que se produce en respue.pdfLa toma de decisiones no rutinarias que se produce en respue.pdf
La toma de decisiones no rutinarias que se produce en respue.pdf
 
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdf
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdfLa tecnologa avanza rpidamente en muchos Servicios de Apoy.pdf
La tecnologa avanza rpidamente en muchos Servicios de Apoy.pdf
 
La teora de los fondos prestables del inters muestra que l.pdf
La teora de los fondos prestables del inters muestra que l.pdfLa teora de los fondos prestables del inters muestra que l.pdf
La teora de los fondos prestables del inters muestra que l.pdf
 
La Revolucin Industrial fue un factor en una explosin demo.pdf
La Revolucin Industrial fue un factor en una explosin demo.pdfLa Revolucin Industrial fue un factor en una explosin demo.pdf
La Revolucin Industrial fue un factor en una explosin demo.pdf
 
La reproduccin en uno de los siguientes rdenes implica el .pdf
La reproduccin en uno de los siguientes rdenes implica el .pdfLa reproduccin en uno de los siguientes rdenes implica el .pdf
La reproduccin en uno de los siguientes rdenes implica el .pdf
 
La responsabilidad es clara Hay ventajas de ahorro de cost.pdf
La responsabilidad es clara  Hay ventajas de ahorro de cost.pdfLa responsabilidad es clara  Hay ventajas de ahorro de cost.pdf
La responsabilidad es clara Hay ventajas de ahorro de cost.pdf
 
La principal diferencia entre los mtodos de pago y compr.pdf
La principal diferencia entre los mtodos de pago y compr.pdfLa principal diferencia entre los mtodos de pago y compr.pdf
La principal diferencia entre los mtodos de pago y compr.pdf
 

KĂŒrzlich hochgeladen

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
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
 
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
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
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).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
 

KĂŒrzlich hochgeladen (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.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...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
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
 
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...
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
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
 
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
 

Lab06_C Write a Java program using Method that will accep.pdf

  • 1. Lab06_C: Write a Java program (using Method) that will accept a number as input from the keyboard and calculate the Cube of a number. (1) If num is less than 0 then the program should print "Number cannot be less than 0" and the program will end. (2) if num is equal or greater than 0 then the program should use a Method to calculate and print out the Cube as follows: The formula to calculate