c language Assignment 7

This work belongs to that course | C Programming Language II
the operational requirements where | https://edu.cnblogs.com/campus/zswxy/CST2019-3/homework/9887
I am skilled use of C language in the target program write code
this job in helping me achieve what specific goals to practice writing code
references "C programming language,"
a .PTA experimental work
1.PTA lab assignments (20 points / questions)

1.1 Cycling and walking
Title Contents:
at the university campus, no bicycle, school work will be very easy but in fact, not everything is running a fast ride, because the rider always looking for the car, unlock, parking. lock the car, etc., it is assumed that some time delay to find a bicycle, car and bicycle lock time of 27 seconds;. car parking lock time 23 seconds; walking foot per 1.2 meters, 3.0 meters per second rider to walk. Please take a different judge distances to work, a fast ride or walk fast.
Input format:
input row contains an integer indicating a service to be walking distance, in meters.
Output format:
the output line, if the rider fast, the output line "Bike"; if fast walking, the output line "Walk"; as fast as if the output line "All".
Sample input:
120
Output Sample:
Bike
1.1.1 Data processing
data expressed: with the a, c, i three variables by assigning values to both, and are double-precision floating-point variable
data treatment: to the arithmetic expression and if-else statement
1.1.2 Screenshot experiment code

1.1.3 Test Data made
Input Data Output Data Description
37 Walk walk faster than the rider
48 Walk walking faster than the rider
200 Bike rider to walk faster than
800 Bike ride faster than walking
1.1.4 PTA submitted listing and description

1.2 calculate the train running time.
Title Contents:
This question requires according to departure time and arrival time of the train, write a program to calculate the time used the whole trip.
Input format:
Input 2 4 gives a positive integer in a row, separated by spaces therebetween, respectively, the departure time and the arrival time of the train. The format of each bit time is 2 (00-23) minutes and two (00-59) hours, assuming arriving and departing on the same day.
Output format:
output line of the travel time used by the format of "hh: mm", where hh is two hours, mm is two minutes.
Sample input:
12011530
Output Sample:
3:29
1.2.1 Data processing
data expressed: defines the integer variable a, b, c, d.
Data processing: "hh: mm", where hh is a number from 2 hours, mm is two minutes.
1.2.2 Code Screenshot

1.2.3 Test Data made
Input Data Output Data Description
10201423 04:03 time difference of 4 hours and 3 minutes
17002019 03:19 time difference of 3 hours 19 minutes
07081118 04:10 time difference of 4 hours 10 minutes
1.2.4PTA submitted listing and description

of.
III. Learning summary
3.1 cumulative lines of code words and blog

3.2 learning sentiment
still want more reading, more learning, more lectures, or look ignorant force

Guess you like

Origin www.cnblogs.com/wy895494356/p/11822791.html