SlideShare a Scribd company logo
1 of 2
Download to read offline
Write a program that displays a table of the Celsius temperatures 0 through 20 and their
Fahrenheit equivalents. The formula for converting a temperature from Celsius toFahrenheit is
F=9 / 5 *C + 32
where F is the Fahrenheit temperature and C is the Celsius temperature. Your program must use
a loop to display the table.
Results will be similar:
C F
0 32.0
1 33.8
2 35.6
20 68.0
USING THIS TEMPLATE :
import java.text.DecimalFormat;
/**
This program demonstrates a solution to the
Celsius to Fahrenheit Table programming challenge.
*/
public class CelsiusToFahrenheitTable
{
public static void main(String[] args)
{
double fahrenheit; // The Fahrenheit temperature
double celsius; // The Celsius temperature
// Create a DecimalFormat class to format output.
DecimalFormat fmt = new DecimalFormat(" 0.0");
// Display the table headings.
System.out.println("CelsiusttFahrenheit");
System.out.println("------------------------------");
// Display the table.
}
}

More Related Content

Similar to Write a program that displays a table of the Celsius temperatures 0 .pdf

Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfinfo706022
 
Travaux Pratique Matlab + Corrige_Smee Kaem Chann
Travaux Pratique Matlab + Corrige_Smee Kaem ChannTravaux Pratique Matlab + Corrige_Smee Kaem Chann
Travaux Pratique Matlab + Corrige_Smee Kaem ChannSmee Kaem Chann
 
Modules and Scripts- Python Assignment Help
Modules and Scripts- Python Assignment HelpModules and Scripts- Python Assignment Help
Modules and Scripts- Python Assignment HelpAnderson Silva
 
c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
Programming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESProgramming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESNaveed Rehman
 

Similar to Write a program that displays a table of the Celsius temperatures 0 .pdf (6)

Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdfTask #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
Task #1 Correcting Logic Errors in FormulasCopy and compile the so.pdf
 
Travaux Pratique Matlab + Corrige_Smee Kaem Chann
Travaux Pratique Matlab + Corrige_Smee Kaem ChannTravaux Pratique Matlab + Corrige_Smee Kaem Chann
Travaux Pratique Matlab + Corrige_Smee Kaem Chann
 
GIS AUTOMATION
GIS AUTOMATIONGIS AUTOMATION
GIS AUTOMATION
 
Modules and Scripts- Python Assignment Help
Modules and Scripts- Python Assignment HelpModules and Scripts- Python Assignment Help
Modules and Scripts- Python Assignment Help
 
c++ Question
c++  Questionc++  Question
c++ Question
 
Programming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EESProgramming for Mechanical Engineers in EES
Programming for Mechanical Engineers in EES
 

More from info335653

You�ve been hired by the local government to determine which employe.pdf
You�ve been hired by the local government to determine which employe.pdfYou�ve been hired by the local government to determine which employe.pdf
You�ve been hired by the local government to determine which employe.pdfinfo335653
 
you will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfyou will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfinfo335653
 
You are the chief data scientist of the marketing company �VisualZ.�.pdf
You are the chief data scientist of the marketing company �VisualZ.�.pdfYou are the chief data scientist of the marketing company �VisualZ.�.pdf
You are the chief data scientist of the marketing company �VisualZ.�.pdfinfo335653
 
Why is the release of GDP statistics less interesting to investors t.pdf
Why is the release of GDP statistics less interesting to investors t.pdfWhy is the release of GDP statistics less interesting to investors t.pdf
Why is the release of GDP statistics less interesting to investors t.pdfinfo335653
 
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdf
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdfWinds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdf
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdfinfo335653
 
With reference to the case study, define social media marketing and cr.pdf
With reference to the case study, define social media marketing and cr.pdfWith reference to the case study, define social media marketing and cr.pdf
With reference to the case study, define social media marketing and cr.pdfinfo335653
 
Will upvote Please fix the following code and post your inputs and o.pdf
Will upvote Please fix the following code and post your inputs and o.pdfWill upvote Please fix the following code and post your inputs and o.pdf
Will upvote Please fix the following code and post your inputs and o.pdfinfo335653
 
Which of the following statements is CORRECT a. The four most importa.pdf
Which of the following statements is CORRECT a. The four most importa.pdfWhich of the following statements is CORRECT a. The four most importa.pdf
Which of the following statements is CORRECT a. The four most importa.pdfinfo335653
 
We will discuss 1. IT systems� complexity IT systems have become unman.pdf
We will discuss 1. IT systems� complexity IT systems have become unman.pdfWe will discuss 1. IT systems� complexity IT systems have become unman.pdf
We will discuss 1. IT systems� complexity IT systems have become unman.pdfinfo335653
 
usingpackage util;import java.util.;This class implements.pdf
usingpackage util;import java.util.;This class implements.pdfusingpackage util;import java.util.;This class implements.pdf
usingpackage util;import java.util.;This class implements.pdfinfo335653
 
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdf
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdfUsing MISP VM ova file, import it on VirtualBox and respond to the q.pdf
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdfinfo335653
 
True or false Public policy is not an important component of organi.pdf
True or false Public policy is not an important component of organi.pdfTrue or false Public policy is not an important component of organi.pdf
True or false Public policy is not an important component of organi.pdfinfo335653
 

More from info335653 (12)

You�ve been hired by the local government to determine which employe.pdf
You�ve been hired by the local government to determine which employe.pdfYou�ve been hired by the local government to determine which employe.pdf
You�ve been hired by the local government to determine which employe.pdf
 
you will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdfyou will implement some sorting algorithms for arrays and linked lis.pdf
you will implement some sorting algorithms for arrays and linked lis.pdf
 
You are the chief data scientist of the marketing company �VisualZ.�.pdf
You are the chief data scientist of the marketing company �VisualZ.�.pdfYou are the chief data scientist of the marketing company �VisualZ.�.pdf
You are the chief data scientist of the marketing company �VisualZ.�.pdf
 
Why is the release of GDP statistics less interesting to investors t.pdf
Why is the release of GDP statistics less interesting to investors t.pdfWhy is the release of GDP statistics less interesting to investors t.pdf
Why is the release of GDP statistics less interesting to investors t.pdf
 
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdf
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdfWinds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdf
Winds of Change in Klickitat CountyThe Harvest Wind ProjectM..pdf
 
With reference to the case study, define social media marketing and cr.pdf
With reference to the case study, define social media marketing and cr.pdfWith reference to the case study, define social media marketing and cr.pdf
With reference to the case study, define social media marketing and cr.pdf
 
Will upvote Please fix the following code and post your inputs and o.pdf
Will upvote Please fix the following code and post your inputs and o.pdfWill upvote Please fix the following code and post your inputs and o.pdf
Will upvote Please fix the following code and post your inputs and o.pdf
 
Which of the following statements is CORRECT a. The four most importa.pdf
Which of the following statements is CORRECT a. The four most importa.pdfWhich of the following statements is CORRECT a. The four most importa.pdf
Which of the following statements is CORRECT a. The four most importa.pdf
 
We will discuss 1. IT systems� complexity IT systems have become unman.pdf
We will discuss 1. IT systems� complexity IT systems have become unman.pdfWe will discuss 1. IT systems� complexity IT systems have become unman.pdf
We will discuss 1. IT systems� complexity IT systems have become unman.pdf
 
usingpackage util;import java.util.;This class implements.pdf
usingpackage util;import java.util.;This class implements.pdfusingpackage util;import java.util.;This class implements.pdf
usingpackage util;import java.util.;This class implements.pdf
 
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdf
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdfUsing MISP VM ova file, import it on VirtualBox and respond to the q.pdf
Using MISP VM ova file, import it on VirtualBox and respond to the q.pdf
 
True or false Public policy is not an important component of organi.pdf
True or false Public policy is not an important component of organi.pdfTrue or false Public policy is not an important component of organi.pdf
True or false Public policy is not an important component of organi.pdf
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
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 ConsultingTechSoup
 
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 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
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
 
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 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

Write a program that displays a table of the Celsius temperatures 0 .pdf

  • 1. Write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. The formula for converting a temperature from Celsius toFahrenheit is F=9 / 5 *C + 32 where F is the Fahrenheit temperature and C is the Celsius temperature. Your program must use a loop to display the table. Results will be similar: C F 0 32.0 1 33.8 2 35.6 20 68.0 USING THIS TEMPLATE : import java.text.DecimalFormat; /** This program demonstrates a solution to the Celsius to Fahrenheit Table programming challenge. */ public class CelsiusToFahrenheitTable { public static void main(String[] args) { double fahrenheit; // The Fahrenheit temperature double celsius; // The Celsius temperature // Create a DecimalFormat class to format output. DecimalFormat fmt = new DecimalFormat(" 0.0"); // Display the table headings. System.out.println("CelsiusttFahrenheit"); System.out.println("------------------------------"); // Display the table.
  • 2. } }