Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com Programming with Viope Tool

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 09-05-2012, 01:42 PM PM User | #1 Viope New to the CF scene   Join Date: Sep 2012 Location: Helsinki-Finland Posts: 2 Thanks: 1 Thanked 0 Times in 0 Posts Programming with Viope Tool Guys..I am studying with Viope Tool and have this question to answer...Really need some help... Write a program that calculates the number of hours worked within a specific period and prints the total number of hours, the average length of a day and an itemisation of the hours entered. First, the program must ask how many days of working hours shall be entered (max 30 days). After this, the program asks for the daily working hours. The program output shall have one decimal place of precision. Hint: It is easiest to implement the program using an array with 30 elements. Example output The program calculates the total hours worked during a specific period and the average length of a day. How many days:5 Enter the working hours for day 1:8.75 Enter the working hours for day 2:6.0 Enter the working hours for day 3:5.5 Enter the working hours for day 4:8.0 Enter the working hours for day 5:7.5 Total hours worked: 35.8 Average length of day: 7.2 Hours entered: 8.8 6.0 5.5 8.0 7.5 After running this code #include 2: 3: int main(void) 4: { 5: float total = 0, hours[30]; 6: int i; 7: 8: printf("The program calculates the total hours worked during\n"); 9: printf("a specific period and the length of a day.\n\n"); 10: 11: printf("How many days:"); 12: scanf("%d", &days); 13: 14: for(i=0;i
 09-05-2012, 04:59 PM PM User | #2 Fou-Lu God Emperor     Join Date: Sep 2002 Location: Saskatoon, Saskatchewan Posts: 16,595 Thanks: 4 Thanked 2,597 Times in 2,566 Posts I don't know what viope is, but this this definitely C code, not python. Moving to computer programing forum. The error is exactly as it states. The "days" variable hasn't been declared anywhere. Its an int, so just predeclare it in with the int i, or give it its own datatype declaration.
 Users who have thanked Fou-Lu for this post: Viope (09-07-2012)
09-07-2012, 03:10 PM   PM User | #3
Viope
New to the CF scene

Join Date: Sep 2012
Location: Helsinki-Finland
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Fou-Lu I don't know what viope is, but this this definitely C code, not python. Moving to computer programing forum. The error is exactly as it states. The "days" variable hasn't been declared anywhere. Its an int, so just predeclare it in with the int i, or give it its own datatype declaration.
thanks a lot for the info..I will try this and contact you if I encounter any issue. Viope is the platform for teaching and learning programming that my school uses.

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 02:22 PM.