Posts

Showing posts from May, 2026

IPAM GRADING SYSTEM (QUESTION 3)

                       INSTITUTE OF PUBLIC ADMINSTATION AND MANAGEMENT(IPAM) MODULE: COMPUTER  PROGRAMMING COURSE:BSC IN INFOMATION TECHNOLOGY YEAR 1 BY: NAOMI BALAMA MOORE   import java.util.Scanner; public class Ipam { public static void main (String[]args){ Scanner grade = new Scanner(System. in ); System. out .println( "enter your grade" ); int input = grade.nextInt(); if (input>= 0 && input<= 20 ){ System. out .println( "f" ); } else if (input>= 21 && input<= 39 ){ System. out .println( "d" ); } else if (input>= 40 && input<= 59 ){ System. out .println( "c" ); } else if (input>= 60 && input<= 79 ){ System. out .println( "b" ); } else if (input>= 80 && input<= 100 ){ System. out .println( "a" ); } else { System. out .println( "invalid grade" ); } } }

THREE CORE SUBJECT ( QUESTION 2)

                 INSTITUTE OF PUBLIC ADMINSTATION AND MANAGEMENT(IPAM) MODULE: COMPUTER  PROGRAMMING COURSE:BSC IN INFOMATION TECHNOLOGY YEAR 1 BY: NAOMI BALAMA MOORE import java.util.Scanner; public class Grade { public static void main (String[] args) { Scanner input = new Scanner(System. in ); int first_module; int second_module; int third_module; System. out .println( "welcome to your grade checker" ); System. out .println( "Enter the first grade module" ); while (!input.hasNextInt()) { System. out .println( "Enter a whole number(grade) for the first module" ); input.next(); } first_module = input.nextInt(); while (first_module< 0 || first_module> 100 ){ System. out .println( "the number is out of the grading range" ); while (!input.hasNextInt()){ System. out .println( "Enter a whol...

LEAPYEAR QUESTION 5

INSTITUTE OF PUBLIC ADMINSTATION AND MANAGEMENT(IPAM MODULE: COMPUTER  PROGRAMMING COURSE:BSC IN INFOMATION TECHNOLOGY YEAR 1 BY: NAOMI BALAMA MOORE   import java.util.Scanner; public class leapyear { public static void main (String[] args) { System. out .println( "Enter a number to determine if it is a leap year or not" ); Scanner input = new Scanner(System. in ); while (!input.hasNextInt()){ System. out .println( "Enter a whole number" ); input.next(); } int number; number = input.nextInt(); if (number % 400 == 0 ){ System. out .println(number + " " + "is a leap year" ); } else { System. out .println(number + " " + "is not a leap year" ); } } }