请阅读此 [ ^ ]
您应该尝试自己做作业. 请注意,这是一个非常简单的任务,如果您最终不会成功,那么您将是一个出色的项目经理.
而不是发布家庭作业问题,发布哪些内容您尝试解决的所有问题.然后问有关的问题.希望没人能免费做功课.
i want ot write a program for calculating challan for traffic violations. The basic idea is that user will enter the type of violation and number of days passed till date of challan. The challan calculator will calculate the challan based upon the type of violation and number of days. Detailed Description: i are required to take input from user for type of traffic violation. User will enter ‘1’ if the violation type is "For breaking traffic signal" User will enter ‘2’ if the violation type is "For over speeding" User will enter ‘3’ if the violation type is "For not wearing seat belt" If user enters any other number except 1, 2 or 3, the program will print a message "Enter a valid type of traffic violation". After printing this message program will start again from beginning and prompt user to enter the valid type of traffic violation. If user enters ‘1’ the amount of fine is Rs.500, if ‘2’ then Rs.300 and if user enters ‘3’ then fine will be Rs.200. Now, program will prompt user to enter number of days passed till challan date. If number of days are less than or equal to 10, then the total challan will be same as amount of fine. If number of days are more than 10 or less than/equal to 30, then total challan will be double of amount of fine. If number of days are more than 30, then 50% of fine will be added in double of amount of fine. i.e. 2 times fine + 1/2 times fine. After displaying the total challan to user, the program should ask if the user wants to calculate another challan. The user can enter ‘y’ or ‘n’ as choices for yes or no. Program will handle user’s choice in both upper and lower cases. If the user enters ‘y’ or ‘Y’, then program should clear the screen and start the whole process again or terminate the program otherwise. what codes should i write to take these results.
解决方案 please read this[^]You should try yourself to do your own homework. Please note this is a very simple task, if you won''t eventually succeed, then you''ll could be a great Project Manager.Rather posting home work questions, post what are all the things you tried to solve it. And then ask the regarding questions. I hope nobody will do your homework for free.更多推荐
违反交通法规的Challan(fine)计算器
发布评论