Problem : There are 1000 students and 1000 doors. 1st person opens all the 1000 doors. 2nd person flips (closes if it is opened, opens if it is closed) 2nd, 4th, 6th,... doors. 3rd person flips 3rd, 6th, 9th, 12th, .... doors. Similarly all the students flips the doors accordingly. Find the number of opened doors. #include"stdio.h" int main() { int a[1001]; for(int i = 1; i < 1001; i++) a[i] = 1; // First person opens all the doors. for(int j = 2; j <= 1000; j++) { // Outer loop for remaining 999 people. for(int k = j; k < 1001; k = k+j) { // Loop for flipping the doors accordingly. if(a[k] == 1) a[k] = 0; else a[k] = 1; } } int count = 0; for(int l = 1; l < 1001; l++) { // Loop for counting the opened doors. if(a[l] == 1) count++; } printf("\n\nThe opened doors are : %d...