c - How to use scanf with 3 integers and '/' between them -
i have started learning c language while ago. let's want add birth date, month , year of random person. user types date, month , year in program. want displayed this! birthday: 20/12/1987 example not printf! want done scanf! problem how add '/' displayed in scanf display in program. note: date, month , year integers
thank you
it's not difficult. try asked:
for [integer]/[integer]/[integer]
format, try this:
int day, month, year; scanf("%d/%d/%d", &day, &month, &year);
Comments
Post a Comment