Posts

Showing posts from March, 2025

PLANE SHAPES AREA AND PERIMETER CALCULATOR

  import java.util.Scanner; public class AREA_CALCULATOR{ public static void main (String[] args) { Scanner Hafiz = new Scanner(System. in ); System. out .println( "WELCOME TO HAFIZ'S AREA CALCULATOR \n PRESS 1 FOR TRIANGLE \n PRESS 2 FOR CIRCLE" ); System. out .println( "PRESS 3 FOR RECTANGLE" ); System. out .println( "PRESS 4 FOR KITE" ); System. out .println( "PRESS 5 FOR TRAPEZIUM" ); System. out .println( "PRESS 6 FOR SQUARE" ); System. out .println( "PRESS 7 FOR RHOMBUS" ); System. out .println( "PRESS 8 FOR PARALLELOGRAM" ); System. out .print( "CHOOSE A SHAPE(1-8): " ); int choice = Hafiz.nextInt(); if (choice == 1 ) { System. out .println( "WELCOME TO THE TRIANGLE SECTION" ); System. out .print( "Enter (1) for Area , (2) for the Perimeter and (3) for both Area and P...

MULTIPLICATION TABLE

  import java.util.Scanner; public class Mohamed_Hafiz_Multiplication_Table { public static void main (String[] hafiz) { Scanner Hafiz = new Scanner(System. in ); System. out .print( "Enter a number to display its multiplication table: " ); int number = Hafiz.nextInt(); System. out .println( "Multiplication table for " + number + ":" ); for ( int i = 1 ; i <= 24 ; i++) { System. out .println(number + " x " + i + " = " + (number * i)); } } } Submitted By: Mohamed Alpha Kamara B. SC. Information Technology I - 24 - 64179