Welcome! Log In Create A New Profile

Advanced

Program 2.5

Posted by boitapisho 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Program 2.5
July 27, 2010 12:29PM
Hello,Everybody

i'm trying to compile this program it says i got 7 errors.
please help me to spot them.





public class SmallBill{
public static void main(String[] args){
System.out.printf("Easy Data Ltd. "winking smiley;
System.out.printf("%02d/%02d/%04d, %02d:02d:%02d%n%n",
20, 3, 2006, 19, 6, 9);
System.out.printf("%-24s %8s %6s %8s%n",
"Item","Price","COunt","Sum"winking smiley;


int count = 2;
double price = 132.25, sum = count*price, total = sum;
System.out.printf("%-24s %8.2f %6d %8.2f%n",
"Ultraflash, USB2.0, 1GB " , price, count, sum);

count = 1;
price = 355.0; sum = count*price; total = total + sum;
System.out.printf("%-24s %8.2f %6d %8.2f%n",
"Mega HD, 300GB" , price, count, sum);

count = 3;
price = 8.33; sum = count*price; total = total + sum;
System.out.printf("%-24s %8.2f %6d %8.2f%n",
"USB 2.0 cable, 2m" , price, count, sum);


System.out.printf("%40s %8.2f%n","Total:" , total);
}
}
Sorry, only registered users may post in this forum.

Click here to login