Computer Science, asked by sum1003, 1 year ago

i need the Blue j (java) program to be solved please . i have to submit this program today. topic:- write the program to accept the rate and quantity of 6 items(cornflakes,oats,rice,pulses,soap,biscuits). calculate the bill for 6 customers individually and print he bill by applying of 2% gst. please help me i need it today.

Answers

Answered by Saharshthegreat
2
Please construct the program yourself.

Make two Single Dimensional arrays of accepting six quantities and their rates.

Scanner sc = new Scanner (System.in);
int rate[] = new int[6];
double qnt[] = new int[6];
double bill = 0.0, tbill = 0.0;
double it[] = new int[6];

Now accept them:
for (int i = 0; i < 6; i++)
{
rate[i] = sc.nextInt();
qnt[i] = sc.nextDouble();
bill[i] = bill + (rate[i]*qnt[i]);
it[i] = bill + (0.02*bill); //bill including GST
}

for (i = 0; i < 6; i++)
{
tbill = tbill + it[i];
}
System.out.println("Total bill is: " + tbill);

hope it helps

sum1003: i am in tension please reply me
sum1003: which class do you read
sum1003: please reply
Saharshthegreat: bro i m not able to do ot sorry
Saharshthegreat: o study in 8
sum1003: ok dear thanks for trying
Saharshthegreat: it is difficult code to write for me in java
Saharshthegreat: HTML waa fine
Saharshthegreat: i might be able to do
sum1003: no thanks
Similar questions