Question

C# coding error with Cengage: MoveEstimator.cs(15,58): error CS1525: Unexpected symbol `total' Compilation failed: 1 error(s), 0...

C# coding error with Cengage: MoveEstimator.cs(15,58): error CS1525: Unexpected symbol `total'
Compilation failed: 1 error(s), 0 warnings
Cannot open assembly 'MoveEstimator.exe': No such file or directory.

Here is my code and the prompt as well

Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile.

Write a program named MoveEstimator that prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee.

Code:

using System;

using static System.Console;

class MoveEstimator

{

   static void Main()

   {

    int hours,miles,total;

    int sum=200;

Console.WriteLine("Enter the number of hours and miles for the job");

hours=int.Parse(Console.ReadLine());

miles=int.Parse(Console.ReadLine());

total=sum+(150*hours)+(2*miles);

Console.WriteLine("The total fee for Malcolm Movers is $" total);

Console.ReadLine();

   }

}

I tried making total equal to 0 as well. My problem is how does the file not exist? Where am I supposed to save it if it is on Cengage?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;

using static System.Console;

class MoveEstimator

{

static void Main()

{

int hours,miles,total;

int sum=200;

Console.WriteLine("Enter the number of hours and miles for the job");

hours=int.Parse(Console.ReadLine());

miles=int.Parse(Console.ReadLine());

total=sum+(150*hours)+(2*miles);

// + is missing in the print statement

Console.WriteLine("The total fee for Malcolm Movers is $"+ total);

Console.ReadLine();

}

}

Regarding Cannot open assembly 'MoveEstimator.exe': No such file or directory. Please reinstall the compiler

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
C# coding error with Cengage: MoveEstimator.cs(15,58): error CS1525: Unexpected symbol `total' Compilation failed: 1 error(s), 0...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Project 1, Program Design 1. Write a C program replace.c that asks the user to enter...

    Project 1, Program Design 1. Write a C program replace.c that asks the user to enter a three-digit integer and then replace each digit by the sum of that digit plus 6 modulus 10. If the integer entered is less than 100 or greater than 999, output an error message and abort the program. A sample input/output: Enter a three-digit number: 928 Output: 584 2. Write a C program convert.c that displays menus for converting length and calculates the result....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT