Saturday, 19 November 2022

Data Types and Operators - Assignment 1

 Problem Statement

Implement a program to find the area of a circle by using the formula given below and display the calculated area. 

Area = pi*radius*radius 

The value of pi is 3.14.

 

Sample Input and Output

Implement a program to find the area of a circle by using the formula given below and display the calculated area.   Area = pi*radius*radius   The value of pi is 3.14.     Sample Input and Output




class Tester{
public static void main(String[]args){
byte rad=4;
float area=(float)(3.14*rad*rad);
System.out.println(area);
byte radius=10;
float ar=(float)(3.14*radius*radius);
System.out.println(ar);
//Implementyourcodehere
}
}






No comments:

Post a Comment

Free Resume Template

Creating a blog post that discusses the pros and cons of using a resume rule is a great way to provide valuable information to job seekers ...