Question
Write a C program that uses functions to print a banner. You must write 2 functions using the prototypes given below in main to print
Write a C program that uses functions to print a banner. You must write 2 functions using the prototypes given below in main to print the banner.
Function 1:
prototype: void printStars (int n);
Description: This function prints a line of n stars(*)
prototype: void printExclaims(int n);
Description: This function prints a line of n/2 exclamation marks(!) each ! followed by a space as shown in the output below.
Hint: main must have 6 function calls
Sample input:
Enter a number: 50
Enter your first name: Abdi
Output:
***************************************************
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
***************************************************
welcome to week 7 lab Abdi
***************************************************
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
****************************************************
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started