This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Introduction to the C Language int b = 125; float c = 899.77; // Statements printf(" Output\n\n========\n"); printf("%c\n%04d\n%4d\n%7.2f\n", a, a, b, c); printf("========\n"); printf( "%7.3f ", c ); printf( "%7.1f ", c ); printf( "%.0f\n", c ); 5. Code a statement that will read the following data stream entered by the user from the keyboard: 45 A 23.18 into the variables as defined below: float amount; int num; char letter; 6. Write statements to prompt the user to enter two integers representing the hour and minute a vehicle entered a parking lot. Then it prompts the user to enter a character for the vehicle type (C for car, B for bus, and T for truck). char vehicle_type; int hour_in; int min_in; 2...
View Full Document
This note was uploaded on 09/02/2011 for the course CIS 15BG taught by Professor Staff during the Spring '10 term at DeAnza College.
- Spring '10
- Computer Programming