SlideShare a Scribd company logo
1 of 2
Download to read offline
import java.util.Scanner;
public class PentagoanArea {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the length from center to vertex: ");
double r = sc.nextDouble();
double sineRadians = Math.toRadians(Math.PI/5);
double tanRadian = Math.toRadians(Math.PI/2);
double s = 2*r*Math.sin(sineRadians);
double area = (5*s*s)/(4*Math.tan(tanRadian));
System.out.println("The are of the pentagoan is: "+String.format("%.2f", area));
//System.out.println("The are of the pentagoan is: "+area);
}
}
Solution
import java.util.Scanner;
public class PentagoanArea {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter the length from center to vertex: ");
double r = sc.nextDouble();
double sineRadians = Math.toRadians(Math.PI/5);
double tanRadian = Math.toRadians(Math.PI/2);
double s = 2*r*Math.sin(sineRadians);
double area = (5*s*s)/(4*Math.tan(tanRadian));
System.out.println("The are of the pentagoan is: "+String.format("%.2f", area));
//System.out.println("The are of the pentagoan is: "+area);
}
}

More Related Content

Similar to import java.util.Scanner;public class PentagoanArea {   public.pdf

Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfmayorothenguyenhob69
 
Modify your solution for PLP04 to allow the user to choose the shape.pdf
Modify your solution for PLP04 to allow the user to choose the shape.pdfModify your solution for PLP04 to allow the user to choose the shape.pdf
Modify your solution for PLP04 to allow the user to choose the shape.pdfhullibergerr25980
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1Ankit Gupta
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iiiNiraj Bharambe
 
Lab101.pptx
Lab101.pptxLab101.pptx
Lab101.pptxKimVeeL
 
Programimport java.util.Scanner; public class AreaOfRectangle {.pdf
Programimport java.util.Scanner; public class AreaOfRectangle {.pdfProgramimport java.util.Scanner; public class AreaOfRectangle {.pdf
Programimport java.util.Scanner; public class AreaOfRectangle {.pdfhimanshukausik409
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manualsameer farooq
 
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
 Problem1 java codeimport java.util.Scanner; Java code to pr.pdf Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
Problem1 java codeimport java.util.Scanner; Java code to pr.pdfanupamfootwear
 

Similar to import java.util.Scanner;public class PentagoanArea {   public.pdf (14)

Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
 
java-programming.pdf
java-programming.pdfjava-programming.pdf
java-programming.pdf
 
Modify your solution for PLP04 to allow the user to choose the shape.pdf
Modify your solution for PLP04 to allow the user to choose the shape.pdfModify your solution for PLP04 to allow the user to choose the shape.pdf
Modify your solution for PLP04 to allow the user to choose the shape.pdf
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1
 
Core java pract_sem iii
Core java pract_sem iiiCore java pract_sem iii
Core java pract_sem iii
 
Lab101.pptx
Lab101.pptxLab101.pptx
Lab101.pptx
 
3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf3.Lesson Plan - Input.pdf.pdf
3.Lesson Plan - Input.pdf.pdf
 
programming for Calculator in java
programming for Calculator in javaprogramming for Calculator in java
programming for Calculator in java
 
Java file
Java fileJava file
Java file
 
Java file
Java fileJava file
Java file
 
Programimport java.util.Scanner; public class AreaOfRectangle {.pdf
Programimport java.util.Scanner; public class AreaOfRectangle {.pdfProgramimport java.util.Scanner; public class AreaOfRectangle {.pdf
Programimport java.util.Scanner; public class AreaOfRectangle {.pdf
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
 Problem1 java codeimport java.util.Scanner; Java code to pr.pdf Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
Problem1 java codeimport java.util.Scanner; Java code to pr.pdf
 
LAB1.docx
LAB1.docxLAB1.docx
LAB1.docx
 

More from sudhirchourasia86

W since less electrons means difficult to melt so.pdf
                     W since less electrons means difficult to melt so.pdf                     W since less electrons means difficult to melt so.pdf
W since less electrons means difficult to melt so.pdfsudhirchourasia86
 
To the left. The ketone is more stable compared .pdf
                     To the left.  The ketone is more stable compared .pdf                     To the left.  The ketone is more stable compared .pdf
To the left. The ketone is more stable compared .pdfsudhirchourasia86
 
The true statement is D. Concentration affects .pdf
                     The true statement is  D. Concentration affects .pdf                     The true statement is  D. Concentration affects .pdf
The true statement is D. Concentration affects .pdfsudhirchourasia86
 
Smaller mass gases have greater rates of effusion.pdf
                     Smaller mass gases have greater rates of effusion.pdf                     Smaller mass gases have greater rates of effusion.pdf
Smaller mass gases have greater rates of effusion.pdfsudhirchourasia86
 
please send the question details I have gone thr.pdf
                     please send the question details  I have gone thr.pdf                     please send the question details  I have gone thr.pdf
please send the question details I have gone thr.pdfsudhirchourasia86
 
melting point of the compound increases due to th.pdf
                     melting point of the compound increases due to th.pdf                     melting point of the compound increases due to th.pdf
melting point of the compound increases due to th.pdfsudhirchourasia86
 
molality = moles of solute kg of solvent In thi.pdf
                     molality = moles of solute  kg of solvent In thi.pdf                     molality = moles of solute  kg of solvent In thi.pdf
molality = moles of solute kg of solvent In thi.pdfsudhirchourasia86
 
Ionic Equation is MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf
                     Ionic Equation is   MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf                     Ionic Equation is   MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf
Ionic Equation is MgO(s) + 2 H+(aq) + 2NO3- (aq.pdfsudhirchourasia86
 
FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf
                     FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf                     FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf
FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdfsudhirchourasia86
 
d) in real gases there are attraction between m.pdf
                     d)   in real gases there are attraction between m.pdf                     d)   in real gases there are attraction between m.pdf
d) in real gases there are attraction between m.pdfsudhirchourasia86
 
SolutionTraversing Binary Trees The preorder standard procedure.pdf
SolutionTraversing Binary Trees The preorder standard procedure.pdfSolutionTraversing Binary Trees The preorder standard procedure.pdf
SolutionTraversing Binary Trees The preorder standard procedure.pdfsudhirchourasia86
 
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdf
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdfShareholder’s equity= Current assets+Net fixed assets-Current lia.pdf
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdfsudhirchourasia86
 
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdf
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdfin Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdf
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdfsudhirchourasia86
 
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdfsudhirchourasia86
 
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdfsudhirchourasia86
 
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdf
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdfInitial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdf
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdfsudhirchourasia86
 
There are ten guidelines with a broad coverage, ranging from develop.pdf
There are ten guidelines with a broad coverage, ranging from develop.pdfThere are ten guidelines with a broad coverage, ranging from develop.pdf
There are ten guidelines with a broad coverage, ranging from develop.pdfsudhirchourasia86
 
The way Ive been told to look at the classifications is to look at.pdf
The way Ive been told to look at the classifications is to look at.pdfThe way Ive been told to look at the classifications is to look at.pdf
The way Ive been told to look at the classifications is to look at.pdfsudhirchourasia86
 

More from sudhirchourasia86 (20)

W since less electrons means difficult to melt so.pdf
                     W since less electrons means difficult to melt so.pdf                     W since less electrons means difficult to melt so.pdf
W since less electrons means difficult to melt so.pdf
 
To the left. The ketone is more stable compared .pdf
                     To the left.  The ketone is more stable compared .pdf                     To the left.  The ketone is more stable compared .pdf
To the left. The ketone is more stable compared .pdf
 
The true statement is D. Concentration affects .pdf
                     The true statement is  D. Concentration affects .pdf                     The true statement is  D. Concentration affects .pdf
The true statement is D. Concentration affects .pdf
 
Smaller mass gases have greater rates of effusion.pdf
                     Smaller mass gases have greater rates of effusion.pdf                     Smaller mass gases have greater rates of effusion.pdf
Smaller mass gases have greater rates of effusion.pdf
 
please send the question details I have gone thr.pdf
                     please send the question details  I have gone thr.pdf                     please send the question details  I have gone thr.pdf
please send the question details I have gone thr.pdf
 
O3, SO3, SO2 .pdf
                     O3, SO3, SO2                                     .pdf                     O3, SO3, SO2                                     .pdf
O3, SO3, SO2 .pdf
 
melting point of the compound increases due to th.pdf
                     melting point of the compound increases due to th.pdf                     melting point of the compound increases due to th.pdf
melting point of the compound increases due to th.pdf
 
molality = moles of solute kg of solvent In thi.pdf
                     molality = moles of solute  kg of solvent In thi.pdf                     molality = moles of solute  kg of solvent In thi.pdf
molality = moles of solute kg of solvent In thi.pdf
 
Ionic Equation is MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf
                     Ionic Equation is   MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf                     Ionic Equation is   MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf
Ionic Equation is MgO(s) + 2 H+(aq) + 2NO3- (aq.pdf
 
FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf
                     FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf                     FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf
FeBrs is a typo Lets suppose it is FeBr2. 2Na .pdf
 
Density increases .pdf
                     Density increases                                .pdf                     Density increases                                .pdf
Density increases .pdf
 
d) in real gases there are attraction between m.pdf
                     d)   in real gases there are attraction between m.pdf                     d)   in real gases there are attraction between m.pdf
d) in real gases there are attraction between m.pdf
 
SolutionTraversing Binary Trees The preorder standard procedure.pdf
SolutionTraversing Binary Trees The preorder standard procedure.pdfSolutionTraversing Binary Trees The preorder standard procedure.pdf
SolutionTraversing Binary Trees The preorder standard procedure.pdf
 
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdf
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdfShareholder’s equity= Current assets+Net fixed assets-Current lia.pdf
Shareholder’s equity= Current assets+Net fixed assets-Current lia.pdf
 
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdf
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdfin Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdf
in Reproductive cloning of mammals the Nucelus ( Genetic material) f.pdf
 
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf
   a) OH- (aq) is a Lewis base because it can give electrions to Oth.pdf
 
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
  package Chapter_20;import ToolKit.PostfixNotation;import javaf.pdf
 
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdf
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdfInitial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdf
Initial concentration of NH3 = molesvolume = 0.2501.00 = 0.250 M.pdf
 
There are ten guidelines with a broad coverage, ranging from develop.pdf
There are ten guidelines with a broad coverage, ranging from develop.pdfThere are ten guidelines with a broad coverage, ranging from develop.pdf
There are ten guidelines with a broad coverage, ranging from develop.pdf
 
The way Ive been told to look at the classifications is to look at.pdf
The way Ive been told to look at the classifications is to look at.pdfThe way Ive been told to look at the classifications is to look at.pdf
The way Ive been told to look at the classifications is to look at.pdf
 

Recently uploaded

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
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
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...Shubhangi Sonawane
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
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
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
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
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
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
 
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
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 

Recently uploaded (20)

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
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
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...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
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
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 

import java.util.Scanner;public class PentagoanArea {   public.pdf

  • 1. import java.util.Scanner; public class PentagoanArea { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter the length from center to vertex: "); double r = sc.nextDouble(); double sineRadians = Math.toRadians(Math.PI/5); double tanRadian = Math.toRadians(Math.PI/2); double s = 2*r*Math.sin(sineRadians); double area = (5*s*s)/(4*Math.tan(tanRadian)); System.out.println("The are of the pentagoan is: "+String.format("%.2f", area)); //System.out.println("The are of the pentagoan is: "+area); } } Solution import java.util.Scanner; public class PentagoanArea { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter the length from center to vertex: "); double r = sc.nextDouble(); double sineRadians = Math.toRadians(Math.PI/5);
  • 2. double tanRadian = Math.toRadians(Math.PI/2); double s = 2*r*Math.sin(sineRadians); double area = (5*s*s)/(4*Math.tan(tanRadian)); System.out.println("The are of the pentagoan is: "+String.format("%.2f", area)); //System.out.println("The are of the pentagoan is: "+area); } }