asked 9.3k views
2 votes
Write a program that shows user input age and outputs "your age" followed by their age

asked
User Luxdvie
by
7.9k points

2 Answers

4 votes

Answer: if it is in JS then its

var age = 17 ;

(or what ever your age is)

console.log (age);

Explanation: var is short for variable and when you use it what ever you make the name you can use when ever in your code the console.log is to make the output the question is requesting

answered
User Omegasbk
by
7.4k points
4 votes

C++:

#include <iostream>

int main() {

int f; std::cin>>f;

std::cout << "Your age is: " << f;

return 0;

}

Python:

f = input("Age: ")

print("Your age is: ",f)

answered
User Young Emil
by
8.7k points

No related questions found