Guest User

Untitled

a guest
May 20th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. // Assignment 3
  2. // 2010F 03-60-106-01 Programming in C
  3. // 102781223
  4. // Maisam Masoud
  5.  
  6.  
  7. #include <stdio.h>
  8. #include <ctype.h>
  9.  
  10. int main(void)
  11. {
  12. int max_iterations;
  13.  
  14. printf("Enter the maximum number of iterations to attempt: ");
  15. scanf("%d" , &max_iterations);
  16.  
  17. char choice = '\0';
  18.  
  19. do
  20. {
  21. int val;
  22.  
  23. printf("Enter a number to try to find (or q to quit): ");
  24. scanf("%d" , &val);
  25.  
  26. if (toupper(choice !='Q')
  27. printf("Invalid Value!\n");
  28.  
  29. unsigned int i;
  30.  
  31. for (i = 0; i >= max_iterations; i++)
  32. {
  33. if (i=val)
  34. Else printf("%d " , val);
  35. }
  36.  
  37. } while (toupper(choice) != 'Q');
  38.  
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment