SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Task 1 - 2.5 POINTS ##Define two integer variables X and Y. ##Set the value of X to 5.
##Write a loop with Y ranging from 1 to 10, print X * Y in each loop. Output should be like this
- 5 * 1 = 5 Task 2 - 2.5 points ##Use a list loop and print out the colors of the rainbow. Task 3 -
4 points ##Design a program that uses a CFSwitch and CFCase structure. Your program must
use the ColdFusion built-in function RandRange() to generate a random number between the
ranges of 1 and 4, and assign this value to a variable called score. ##Your program must now
display a separate message depending on the value of this score as generated by the RandRange
function. If the value is 4, display the message “Your grade is an A― If the value is 3,
display the message “Your grade is B” If the value is 2, display the message “Your
grade is C” If the value is 1, display the message “Your grade is D” Hint: The
RandRange() function returns an integer between two specified numbers. The syntax to use the
RandRange function is RandRange(num1, num2). Example - RandRange (1,4) will give random
values between 1 and 4. Task 4 - 1 point Start working on your DB connectivity. Include a
message in your assignment submission telling me how far you have progressed. I will give you
a full point if you've started even if you don't have access yet. Feel free to post in the discussion
forums when you're connected so that your classmates can see how far they have progressed
too.
Solution
import java.util.Scanner;
public class MultiplyNumbers {
public static void main(String[] args) {
int x=5,y,prod;
for(y=1;y<=10;y++)
{
prod= x*y;
System.out.println(x+"*"+y+"="+prod);
}
}
}
Task 1 - 2-5 POINTS ##Define two integer variables X and Y- ##Set the.docx

Weitere ähnliche Inhalte

Ähnlich wie Task 1 - 2-5 POINTS ##Define two integer variables X and Y- ##Set the.docx

5 structured programming
5 structured programming 5 structured programming
5 structured programming
hccit
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
shandicollingwood
 
E1 – FundamentalsPlease refer to announcements for details about.docx
E1 – FundamentalsPlease refer to announcements for details about.docxE1 – FundamentalsPlease refer to announcements for details about.docx
E1 – FundamentalsPlease refer to announcements for details about.docx
jacksnathalie
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
jacksnathalie
 

Ähnlich wie Task 1 - 2-5 POINTS ##Define two integer variables X and Y- ##Set the.docx (20)

5 structured programming
5 structured programming 5 structured programming
5 structured programming
 
best notes in c language
best notes in c languagebest notes in c language
best notes in c language
 
C code examples
C code examplesC code examples
C code examples
 
Introduction to python programming ( part-2 )
Introduction to python programming ( part-2 )Introduction to python programming ( part-2 )
Introduction to python programming ( part-2 )
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcements.docx
 
Inroduction to r
Inroduction to rInroduction to r
Inroduction to r
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
E1 – FundamentalsPlease refer to announcements for details about.docx
E1 – FundamentalsPlease refer to announcements for details about.docxE1 – FundamentalsPlease refer to announcements for details about.docx
E1 – FundamentalsPlease refer to announcements for details about.docx
 
Variables
VariablesVariables
Variables
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Unit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptxUnit 1 - R Programming (Part 2).pptx
Unit 1 - R Programming (Part 2).pptx
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
 
Php 101 by David Menendez
Php 101 by David MenendezPhp 101 by David Menendez
Php 101 by David Menendez
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Lab6: I/O and Arrays
Lab6: I/O and ArraysLab6: I/O and Arrays
Lab6: I/O and Arrays
 
C important questions
C important questionsC important questions
C important questions
 
csharp repitition structures
csharp repitition structurescsharp repitition structures
csharp repitition structures
 
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docxE2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
E2 – Fundamentals, Functions & ArraysPlease refer to announcemen.docx
 

Mehr von william842

Technical testing metrics fall into two major categories- What are the.docx
Technical testing metrics fall into two major categories- What are the.docxTechnical testing metrics fall into two major categories- What are the.docx
Technical testing metrics fall into two major categories- What are the.docx
william842
 
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docxTerri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
william842
 
Sustainability is an important ethical and environmental issue in purc.docx
Sustainability is an important ethical and environmental issue in purc.docxSustainability is an important ethical and environmental issue in purc.docx
Sustainability is an important ethical and environmental issue in purc.docx
william842
 
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docxCloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
william842
 
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docxClint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
william842
 

Mehr von william842 (20)

Ted considers himself a skillful hacker- He has devised a way to repla.docx
Ted considers himself a skillful hacker- He has devised a way to repla.docxTed considers himself a skillful hacker- He has devised a way to repla.docx
Ted considers himself a skillful hacker- He has devised a way to repla.docx
 
Technical testing metrics fall into two major categories- What are the.docx
Technical testing metrics fall into two major categories- What are the.docxTechnical testing metrics fall into two major categories- What are the.docx
Technical testing metrics fall into two major categories- What are the.docx
 
Taylor and Jordan are married and file a joint tax return claiming the.docx
Taylor and Jordan are married and file a joint tax return claiming the.docxTaylor and Jordan are married and file a joint tax return claiming the.docx
Taylor and Jordan are married and file a joint tax return claiming the.docx
 
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docxTerri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
Terri Keys son Taylor was diagnosed with Tourettes syndrome- obsessive.docx
 
The accrual basis of accounting requires revenue to be recorded when t.docx
The accrual basis of accounting requires revenue to be recorded when t.docxThe accrual basis of accounting requires revenue to be recorded when t.docx
The accrual basis of accounting requires revenue to be recorded when t.docx
 
The Access Point bridge needs its own DHCP server since it is on a dif.docx
The Access Point bridge needs its own DHCP server since it is on a dif.docxThe Access Point bridge needs its own DHCP server since it is on a dif.docx
The Access Point bridge needs its own DHCP server since it is on a dif.docx
 
The account Unrealized Gain (Loss) on Trading Securities should be inc.docx
The account Unrealized Gain (Loss) on Trading Securities should be inc.docxThe account Unrealized Gain (Loss) on Trading Securities should be inc.docx
The account Unrealized Gain (Loss) on Trading Securities should be inc.docx
 
The 2013 balance sheet for Hallbrook Industries- Inc-- is shown below.docx
The 2013 balance  sheet for Hallbrook Industries- Inc-- is shown below.docxThe 2013 balance  sheet for Hallbrook Industries- Inc-- is shown below.docx
The 2013 balance sheet for Hallbrook Industries- Inc-- is shown below.docx
 
The -meta charset-utf-8- element specifies what scheme the web page us.docx
The -meta charset-utf-8- element specifies what scheme the web page us.docxThe -meta charset-utf-8- element specifies what scheme the web page us.docx
The -meta charset-utf-8- element specifies what scheme the web page us.docx
 
Sustainability is an important ethical and environmental issue in purc.docx
Sustainability is an important ethical and environmental issue in purc.docxSustainability is an important ethical and environmental issue in purc.docx
Sustainability is an important ethical and environmental issue in purc.docx
 
Thank you- Let Phi- R rightarrow S be a surjective homomorphism from t.docx
Thank you- Let Phi- R rightarrow S be a surjective homomorphism from t.docxThank you- Let Phi- R rightarrow S be a surjective homomorphism from t.docx
Thank you- Let Phi- R rightarrow S be a surjective homomorphism from t.docx
 
class is intro to computers - studying environmental studies and law e.docx
class is intro to computers - studying environmental studies and law e.docxclass is intro to computers - studying environmental studies and law e.docx
class is intro to computers - studying environmental studies and law e.docx
 
Common Stock Dividends Distributable is reported in the balance sheet-.docx
Common Stock Dividends Distributable is reported in the balance sheet-.docxCommon Stock Dividends Distributable is reported in the balance sheet-.docx
Common Stock Dividends Distributable is reported in the balance sheet-.docx
 
column on the pericol tabie iOus Ciou f States that the properties of.docx
column on the pericol tabie iOus Ciou f States that the properties of.docxcolumn on the pericol tabie iOus Ciou f States that the properties of.docx
column on the pericol tabie iOus Ciou f States that the properties of.docx
 
Coby has been working on a research paper about poverty in America- In.docx
Coby has been working on a research paper about poverty in America- In.docxCoby has been working on a research paper about poverty in America- In.docx
Coby has been working on a research paper about poverty in America- In.docx
 
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docxCloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
Cloud Computing Theory and Practice chapter 2 problem 7 Tuple-spaces c.docx
 
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docxClint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
Clint is Marilyn-'s supervisor- Marilyn is a dedicated part-time emplo.docx
 
Cleary- Wasser- and Nolan formed a partnership on January 1- 2010- wit.docx
Cleary- Wasser- and Nolan formed a partnership on January 1- 2010- wit.docxCleary- Wasser- and Nolan formed a partnership on January 1- 2010- wit.docx
Cleary- Wasser- and Nolan formed a partnership on January 1- 2010- wit.docx
 
Classify each of the compounds as Soluble (s) or Not Soluble (ns)-.docx
Classify each of the compounds as Soluble (s) or Not Soluble (ns)-.docxClassify each of the compounds as Soluble (s) or Not Soluble (ns)-.docx
Classify each of the compounds as Soluble (s) or Not Soluble (ns)-.docx
 
Choose the statement below that is TRUE- Choose the statement below th.docx
Choose the statement below that is TRUE- Choose the statement below th.docxChoose the statement below that is TRUE- Choose the statement below th.docx
Choose the statement below that is TRUE- Choose the statement below th.docx
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).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
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
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.
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
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)
 
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
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 

Task 1 - 2-5 POINTS ##Define two integer variables X and Y- ##Set the.docx

  • 1. Task 1 - 2.5 POINTS ##Define two integer variables X and Y. ##Set the value of X to 5. ##Write a loop with Y ranging from 1 to 10, print X * Y in each loop. Output should be like this - 5 * 1 = 5 Task 2 - 2.5 points ##Use a list loop and print out the colors of the rainbow. Task 3 - 4 points ##Design a program that uses a CFSwitch and CFCase structure. Your program must use the ColdFusion built-in function RandRange() to generate a random number between the ranges of 1 and 4, and assign this value to a variable called score. ##Your program must now display a separate message depending on the value of this score as generated by the RandRange function. If the value is 4, display the message “Your grade is an A― If the value is 3, display the message “Your grade is B” If the value is 2, display the message “Your grade is C” If the value is 1, display the message “Your grade is D” Hint: The RandRange() function returns an integer between two specified numbers. The syntax to use the RandRange function is RandRange(num1, num2). Example - RandRange (1,4) will give random values between 1 and 4. Task 4 - 1 point Start working on your DB connectivity. Include a message in your assignment submission telling me how far you have progressed. I will give you a full point if you've started even if you don't have access yet. Feel free to post in the discussion forums when you're connected so that your classmates can see how far they have progressed too. Solution import java.util.Scanner; public class MultiplyNumbers { public static void main(String[] args) { int x=5,y,prod; for(y=1;y<=10;y++) { prod= x*y; System.out.println(x+"*"+y+"="+prod); } } }