C2001: newline in constant error: HELP! [message #302461] |
Mon, 25 February 2008 17:57 |
Tiffers990
Messages: 1 Registered: February 2008 Location: D.C.
|
Junior Member |
|
|
#include "stdafx.h"
using namespace System;
int main(array<System::String ^> ^args)
{
int price,
inventory,
sold,
revenue,
balance,
percentage,
initial;
{
// prompt first number
Console::WriteLine( L"Enter price of the product: “ );
price = Int32::Parse( Console::ReadLine() );
Console::WriteLine( L"Enter initial quantity in inventory: “ );
inventory = Int32::Parse( Console::ReadLine() );
Console::WriteLine( L"Enter quantity sold: “ );
sold = Int32::Parse( Console::ReadLine() );
}
// find the revenue
revenue = sold * price
Console::WriteLine( L"\nRevenue is: {0}.” , revenue.ToString() );
// find inventory balance
balance = inventory – sold
Console::WriteLine( L"\nInventory balance is: {0}.” , balance.ToString() );
// find inventory percentage
percentage = (sold / inventory) * 100
Console::WriteLine( L"\nPercentage of inventory sold is: {0} .” , percentage.ToString() );
// amount of initial inventory
initial = inventory * price
Console::WriteLine( L"\nInitial inventory value was: {0}.” , initial.ToString() );
return 0;
} // end _tmain
|
|
|
|
|