Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Assignment 3
- // 2010F 03-60-106-01 Programming in C
- // 102781223
- // Maisam Masoud
- #include <stdio.h>
- #include <ctype.h>
- int main(void)
- {
- int max_iterations;
- printf("Enter the maximum number of iterations to attempt: ");
- scanf("%d" , &max_iterations);
- char choice = '\0';
- do
- {
- int val;
- printf("Enter a number to try to find (or q to quit): ");
- scanf("%d" , &val);
- if (toupper(choice !='Q')
- printf("Invalid Value!\n");
- unsigned int i;
- for (i = 0; i >= max_iterations; i++)
- {
- if (i=val)
- Else printf("%d " , val);
- }
- } while (toupper(choice) != 'Q');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment