for your school test you have to raise sponsorship amount of rs. 50000/-. two groups have raised rs. 5200/- and 6800/- respectively.write a program to divide the rest of the amount among the five other groups that have still to raise the amount.
Answers
5200 group 1
6800 group 2
so 50k
50000 - (5200 + 6800) = 50000 - 12000=
38000/3=12666.66each
Answer: Java program is given below.
Explanation:
// Java program to raise the left amount and divide among the group
import java.util.*; // importing util package
class Fund {
public static void main (String args [ ] ) { // main method is created
int num = 5, g1 = 5200, g2 = 6800; // values are assigned in variables
double amount = 50000, fund;
fund = ( amount - g1 - g2) / num ; // fund to be raised by each group is // calculated
System.out.println(" The fund to be raised by each group to raise the amount is :" + fund) ;
}
}
_____________________________________________________
Related Links :
Name the two types of java program.
https://brainly.in/question/2803098
Which of the following is the reason of Java programs' platform independence ?
(a) Java compiler
(b) Java virtual machine
(c) Java byte code
(d) all the above
https://brainly.in/question/21286665
#SPJ2