Admin
Registered: 18 years ago
Posts: 10,001
Rating: 353
Post Java code in these forums by clicking the 4th button from the left in the toolbar. Click on Java. Two tags will appear. Write or paste your code between these tags.
The result appears here aunder.
Language: Java
int counter =1;double total =0;do{System.out.println("Enter price of item [decimal]: ");double price = keyIn.nextDouble();
total = total + price;assert total <100.0;
counter = counter +1;}while(counter <5);
The reason we make use of code tags is that some code can be interpreted by the server as smileys, e.g. " when you meant to show " )
Admin
Registered: 18 years ago
Posts: 10,001
Rating: 353
This thread does not mean that you have to post your Java code here - it just explains how to post code in this forum... and clearly you did not do it as requested..?
Admin
Registered: 18 years ago
Posts: 10,001
Rating: 353
Then start a new thread and explain your problem.... It is like saying - I have a problem with my car - help me fix it. What is wrong, what have you tried? What error message do you get?