- Write a program that takes a first name as the input, and outputs a welcome message to that name.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
icon
Related questions
icon
Concept explainers
Question

C - Write a program that takes a first name as the input, and outputs a welcome message to that name.

Write a program that takes a first name as the input, and outputs a welcome message to that name.
Ex: If the input is:
Pat
the output is:
Hey Pat!
Welcome to zyBooks!
1 #include <stdio.h>
GSA WNP
2
3 int main(void) {
4 char userName [50];
5
6 scanf("%s", userName);
7009
8
9
10 }
11
/* Type your code here. */
return 0;
main.c
Transcribed Image Text:Write a program that takes a first name as the input, and outputs a welcome message to that name. Ex: If the input is: Pat the output is: Hey Pat! Welcome to zyBooks! 1 #include <stdio.h> GSA WNP 2 3 int main(void) { 4 char userName [50]; 5 6 scanf("%s", userName); 7009 8 9 10 } 11 /* Type your code here. */ return 0; main.c
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Operators
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage