#include #include typedef struct { string name; string party; float probability; } candidate; candidate get_candidate(string prompt); int main(void) { candidate first_candidate = get_candidate("Enter a candidate: "); printf("Candidate name is: %s\n", first_candidate.name); printf("Candidate party is: %s\n", first_candidate.party); printf("Candidate probability is: %f\n", first_candidate.probability); } candidate get_candidate(string prompt) { printf("%s\n", prompt); candidate new_candidate; new_candidate.name = get_string("What's the candidate's name? "); new_candidate.party = get_string("What's the candidate's party? "); new_candidate.probability = get_float("What's the candidate probability? "); return new_candidate; }