Untitled
unknown
c_cpp
2 years ago
433 B
2
Indexable
Never
#include <stdio.h> int main() { char firstname[20], lastname[20]; int age; printf("Enter firstname: "); scanf("%[^\n]",firstname); printf("Enter lastname: "); scanf("\n%[^\n]",lastname); printf("Enter age: "); scanf("%d", &age); printf("\n====/====/====/====/====\n"); printf("Name: %s %s\n", firstname, lastname); printf("You are now %d years old. \n",age); return 0; }