1、
#include <stdio.h> void critic(int * ar1); int main(void) { int num; printf("how many pounds to a firkin of butter? \n"); scanf("%d", &num); while(num != 56) critic(&num); printf("you must have looked the answer!\n"); return 0; } void critic(int * ar1) { printf("wrong, try again!\n"); scanf("%d", ar1); }
#include <stdio.h> void critic(int * n); int main(void) { int units; printf("how many pounds to a firkin of butter?\n"); scanf("%d", &units); while(units != 56) critic(&units); printf("you must have looked it up!\n"); return 0; } void critic(int * n) { printf("No luck, my friends, try again.\n"); scanf("%d", n); }