Computers and Technology
Computers and Technology, 15.04.2020 21:39, jayliahj

Complete the function ConvertToFeetAndInches to convert totalInches to feet and inches. Return feet and inches using the HeightFtIn struct. Ex: 14 inches is 2 feet and 2 inches.

#include

typedef struct HeightFtIn_struct {

int feet;

int inches;

} HeightFtIn;

HeightFtIn ConvertToFeetAndInches(int totalInches) {

HeightFtIn tempVal;

/* Your solution goes here */

}

int main(void) {

HeightFtIn studentHeight;

int totalInches;

scanf("%d", &totalInches);

studentHeight = ConvertToFeetAndInches(totalInches) ;

printf("%d feet and %d inches\n", studentHeight. feet, studentHeight. inches);

return 0;

}

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 02:20, Jonny13Diaz
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
Answers: 1
image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 11:00, asiaosterling
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
image
Computers and Technology, 24.06.2019 17:40, lia1690
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
Do you know the correct answer?
Complete the function ConvertToFeetAndInches to convert totalInches to feet and inches. Return feet...

Questions in other subjects: