Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* colourloop.c
- Author: Sam Dunne
- Description: This allows users to enter there 4 favorite colours using a while loop
- Date: 7/10/2010 */
- #include <stdio.h>
- int main()
- {
- char *colour;
- int i =0;
- while(i<3)
- {
- printf("Enter your favorite colour:");
- scanf("%s", colour);
- printf("Your favorite colour is %s \n", colour);
- i++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement