Computer Science, asked by amarnath4173, 6 months ago

write a c++ program that account executive must keep track of her expenses on a business trip. Write a program that totals the executive's expenses. The program should ask the user to enter the number of miles driven (Rs. 12 per mile), the amount spent on highway tolls and parking, the amount spent on meals, the amount spent on lodging, and the amount spent on entertainment. ​

Answers

Answered by aarifatrichy
0

Answer:

IAM SORRY IAM NOT ABLE TO UNDERSTAND

Explanation:

Answered by kamalrajatjoshi94
1

Answer:

import java.util.*;

class Expenses

{

public static void main(String args[])

{

Scanner in=new Scanner(System.in);

int m,adc=0,ah,ap,am,al,ae,tamt=0;

System.out.println("Enter the miles travelled");

m=in.nextInt();

System.out.println("Enter the money spent on highway tolls");

ah=in.nextInt();

System.out.println("Enter the money spent on parking");

ap=in.nextInt();

System.out.println("Enter the money spent on meals");

am=in.nextInt();

System.out.println("Enter the money spent on lodging");

al=in.nextInt();

System.out.println("Enter the money spent on entertainment");

ae=in.nextInt();

adc=m*12;

tamt=adc+ah+ap+am+al+ae;

System.out.println("The money spent on travelling="+adc);

System.out.println("The money spent on highway trolls="+ah);

System.out.println("The money spent on parking="+ap);

System.out.println("The money spent on meals="+am);

System.out.println("The money spent on lodging="+al);

System.out.println("The money spent on entertainment="+ae);

System.out.println("The total amount="+tamt);

}

}

Similar questions