1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
navik [9.2K]
3 years ago
9

2. Write a program to calculate CGPA of a student. The program should be able to get input from the user of the grade for each c

ourse. Use data in Table 1 and Table 2 as to calculate the CGPA.
Course Credit Hour
Mathematics 5
Physics 5
Chemistry 5
Computer 5
BEL 3
CTU 2
Table 1: Course Information

Grade Point
A 4.00
B 3.00
C 2.00
Table 2: Grade Information
...?
Computers and Technology
1 answer:
Irina18 [472]3 years ago
7 0
The easy way to do it is to let an array accept all the inputs and add all the inputs together and divide the sum by how many the input was. 

Example : five + five + five + five + three + two = 25
Now divide twenty five : twenty five / six = 4.1

Letter A is the closest answer.
You might be interested in
Write a recursive method named binarySearch that accepts a sorted array of integers and an integer target value and uses a recur
djyliett [7]

Answer:

10

-1

Process finished with exit code 0

Explanation: see code bellow

public class BinarySearchRecursive {

   public static int binarySearch(int[] a, int key) {

       return binarySearchRecursiveHelper(a, key, 0, a.length - 1);

   }

   public static int binarySearchRecursiveHelper(int[] arr, int target, int start, int end) {

       if (start > end) {

           return -1;

       }

       int mid = (start + end) / 2;

       if (arr[mid] == target) {

           return mid;

       } else if (target < arr[mid]) {

           return binarySearchRecursiveHelper(arr, target, start, mid - 1);

       } else {

           return binarySearchRecursiveHelper(arr, target, mid + 1, end);

       }

   }

   public static void main(String[] args) {

       int[] a = {-4, 2, 7, 10, 15, 20, 22, 25, 30, 36, 42, 50, 56, 68, 85, 92, 103};

       int index = binarySearch(a, 42);   // 10

       System.out.println(index);

       index = binarySearch(a, 66);   // -1

       System.out.println(index);

   }

}

6 0
3 years ago
What is faster C++ or go lang
alukav5142 [94]

Answer:

C++

Explanation:

3 0
3 years ago
What is the output of this Python code?
Simora [160]

Answer:

True

Explanation:

in function guess:- a = x; b = y; c = z

so 45 > 31 AND 45 < 38

since both the stements are true

True is printed

8 0
3 years ago
What is an electronic medical record
Airida [17]
EGC . medical research science
3 0
3 years ago
Which of these monitor connector types is the oldest and least desirable to use?
ella [17]

Answer:

DVI is the oldest out of the four.

Explanation:

DVI and VGA are the oldest, but DVI is oldest and least desirable to use since it is outdated.

5 0
3 years ago
Read 2 more answers
Other questions:
  • 3) Write a program named Full_XmasTree using a nested for loop that will generate the exact output. This program MUST use (ONLY)
    6·1 answer
  • Morgan is the operations manager for a national appliance distributor. The company has offices throughout the United States. Com
    7·1 answer
  • What operator is used to create a validation rule? A. – B. / C. &lt; or &gt; D. +
    12·1 answer
  • How to burn mp3 on dvd
    13·2 answers
  • Which of the following is the part of a digital camera that acts as the film?
    11·1 answer
  • In order to get a comprehensive evaluation of the computer programmers he managed, Justin organized a(n) __________, where he as
    11·1 answer
  • Write a program which populates an array with integer values read from a file. We do not know how many integers are in the file,
    8·1 answer
  • Assume there are two variables, k and m, each already associated with a positive integer value and further assume that k's value
    13·1 answer
  • Derek has to create a technical design of a complex floor plan using CAD. What will be most helpful for Derek to use to create t
    8·1 answer
  • When assigning a value to a string, which of the following rules needs to be followed?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!