Posts

A program that calculates different shapes

piblic class Shapes{ static void perimeter_triangle(double a,double b,double c){ double perimeter=(a+b+c); system.out.println(perimeter); } static void perimeter_rhombus(double side){ double perimeter=4*side; system.out.println(perimeter); } static void perimeter_square(double side){ double perimeter=4*side; system.out.println(perimeter); } static void area_triangle(double base,double height){ double area=0.5*base*height; system.out.println(area); } static void area_trapezium(double a,double b,double h){ double area=0.5*((a+b)*h); system.out.println(area); } static void area_circle(double r){ final double pi=3.142; double area=pi*(r*r); system.out.println(area); } public static void main(string[]args){ perimeter_triangle(2,4,6); perimeter_rhombus(10); perimeter_square(7.2); area_triangle(4,10); area_trapezium(4.5,3.6,10); area_circle(17); } }

calculate the area of a rectangle using the next double

  A program that can calculate the area of a rectangle using the nextDouble  import java.util.*; public class Rectangle {     public static void main(String[] args){       Scanner scan = new Scanner(System.in);         double length,width; System.out.println("please enter the value of the length"); length = scan.nextDouble();         System.out.println("please enter the value of width");         width = scan.nextDouble();         double area = length*width;         System.out.println("the area of the rectangle is ="+" "+area);     }      }

My computer programming assignment

 1. Milestones of computing and programming languages . The milestone of computing and programming languages has seen a series of significant developments that have shaped the history of technology. Here is an expanded overview of some of the key milestones: 1. λ-calculus (1932) - a formal system in mathematical logic and computer science used to express computation based on function abstraction and application. 2. FORTRAN (1956) - one of the earliest high-level programming languages designed for scientific and engineering computations. 3. ALGOL 58 (1958) - the first version of the algorithmic language (ALGOL), which influenced many other programming languages. 4. COBOL (1960) - Common Business-Oriented Language developed for business, finance, and administrative systems. 5. PL/I (1964) - Programming Language One, a general-purpose programming language that was particularly popular in the 1960s and 1970s. 6. Pascal (1970) - created by Niklaus Wirth, it was designed to encourage goo...

Mr Fuad Assignment on computer programming

Image