#include #include //What are the problems with this program? //the program should use a switch block to assign values to each variable int main() { int i, res; int a, b, c, d, e, f; int cur; for(i=1; i<=6; i++) { printf("input var %d\n", i); scanf("%d", cur); switch(i) { case 1: a = cur; case 2: b = cur; case 3: c = cur; case 4: d = cur; case 5: e = cur; case 6: f = cur; } //printf("%d\tres=%d\n", i, cur); print can be used to debug } printf("%d %d %d %d %d\n", a, b, c, d, e, f); system("pause"); } //there are no break statements //the value for cur is incorrectly read in