Why input and output are required
๐ Scenario: Imagine you want to create a simple program that asks a user for their name and then says hello to them. To do this, the program needs to get information from the user (input) and then show a message back (output).
๐ฏ Goal: Build a small Go program that asks for a user's name and then prints a greeting message using that name.
๐ What You'll Learn
Use
fmt.Scanln to get input from the userUse
fmt.Println to show output to the userStore the input in a variable called
namePrint a greeting message that includes the
name๐ก Why This Matters
๐ Real World
Many programs need to ask users questions and show answers, like calculators, games, or websites.
๐ผ Career
Understanding input and output is a basic skill for any programmer to make interactive applications.
Progress0 / 4 steps