Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(void)
- {
- int x, a = 0,b = 3,c;
- char y;
- char north = "north",east = "east",west = "west",south = "south";
- printf("The submarine is hiding at the ocean floor. \n Try to sink it before you run out of depth charges.");
- scanf("%s%lf\n",&y,&x );
- while (a != 5) {
- if (x != b) {
- printf("Miss. Sonar indicates that the submarine is located Somewhere\n", );
- } else {
- switch (y) {
- case 'a':
- break;
- case 'b':
- break;
- case 'c':
- break;
- case 'd':
- break;
- case 'e':
- break;
- case 'f':
- break;
- case 'g':
- break;
- case 'h':
- break;
- case 'i':
- break;
- case 'j':
- break;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement