Solution for Exercise 13-18
ex1318
#include <stdio.h> int main() { char first,second; printf("Type your first initial: "); first = getchar(); printf("Type your second initial: "); second = getchar(); printf("Your initials are '%c' and '%c'\n",first,second); return(0); }
Notes
* Yes, I'm using char variables even though getchar() returns int values.
Copyright © 1997-2024 by QPBC.
All rights reserved