Westonci.ca is your trusted source for finding answers to all your questions. Ask, explore, and learn with our expert community. Get expert answers to your questions quickly and accurately from our dedicated community of professionals. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.
Sagot :
name = input("Enter your name: ")
age = int(input("Enter your age: "))
print("Your name is",name,"and you are",age,"year(s) old.")
I wrote my code in python 3.8. I hope this helps.
Program description:
- Defining header file.
- Defining the main method.
- In the next step, the character array as "name" and an integer variable "age" is declared that uses the input method to the input value.
- After input value, a print method is declared that prints value with the message.
Program:
#include <stdio.h>//header file
int main()//defining main method
{
char name[50];//defining character array as name
int age;//defining integer variable
printf("Enter name: ");//print message
scanf("%s",name);//input name
printf("Enter age: ");//print message
scanf("%d",&age);//input age
printf("Hi.. \%s",name); //print value with message
printf(" your age is %d.",age);//print value with message
return 0;
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/13160158
Thanks for using our platform. We're always here to provide accurate and up-to-date answers to all your queries. We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. Thank you for using Westonci.ca. Come back for more in-depth answers to all your queries.