subject

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;

}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
How can data be added in a table by using what view
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
You know the right answer?
Complete the function ConvertToFeetAndInches to convert totalInches to feet and inches. Return feet...
Questions
question
Mathematics, 22.03.2021 19:30
question
Mathematics, 22.03.2021 19:30
Questions on the website: 13722367