Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float n1 = 0, n2 = 0;
- char choice = 0;
- do {
- n1 = 0;
- n2 = 0;
- choice = 0;
- printf( "Enter a character, and two floats.\n" );
- int read = scanf( "%c %f %f", &choice, &n1, &n2 );
- printf( "Values read: %d -- %c, %.2f, %.2f\n", read, choice, n1, n2 );
- } while( choice != 'q' );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement