Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstdlib>
- int main()
- {
- char name[20];
- int age;
- double height;
- printf("Enter your name: ");
- scanf_s("%s", name, static_cast<unsigned>(_countof(name)));
- printf("Enter your age: ");
- scanf_s("%d", &age);
- printf("Enter your height: ");
- scanf_s("%lf", &height);
- printf("You are %s, you are %d years old, and your height in meters is %.2lf\n",
- name,
- age,
- height);
- system("pause.exe");
- printf("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement