Print block 'F' and a large 'C'
C Practice Exercise
Write a C program to print a block F using the hash (#), where the F has a height of six characters and width of five and four characters. And also print a very large 'C'.
Block of 'F':
C Code:
#include <stdio.h>
int main()
{
// Print a line of hashes
printf("######\n");
// Print a single hash
printf("#\n");
// Print a single hash
printf("#\n");
// Print a line of hashes
printf("#####\n");
// Print a single hash
printf("#\n");
// Print a single hash
printf("#\n");
// Print a single hash
printf("#\n");
return(0);
}
Sample Output:
###### # # ##### # # #
Pictorial Presentation:
![C Programming: Print a block F using hash (#)](https://www.w3resource.com/w3r_images/c-basic-declarations-and-expressions-image-exercise-2.png)
Flowchart:
![C Programming Flowchart: Print a block F using hash](https://www.w3resource.com/w3r_images/c-programming-basic-exercises-flowchart-2.png)
Print a big 'C':
C Code:
#include <stdio.h>
int main()
{
// Print top line of pattern
printf(" ######\n");
// Print second line of pattern
printf(" ## ##\n");
// Print lines 3 to 7 of pattern
printf(" #\n");
printf(" #\n");
printf(" #\n");
printf(" #\n");
printf(" #\n");
// Print bottom line of pattern
printf(" ## ##\n");
// Print last line of pattern
printf(" ######\n");
return(0);
}
Sample Output:
###### ## ## # # # # # ## ## ######
Pictorial Presentation:
![C Programming: Print a big C](https://www.w3resource.com/w3r_images/c-basic-declarations-and-expressions-image-exercise-3.png)
Flowchart:
![C Programming Flowchart: Print a big C](https://www.w3resource.com/w3r_images/c-programming-basic-exercises-flowchart-3.png)
C Programming Code Editor:
Previous: Write a C program to get the C version you are using.
Next: Write a C program to print the following characters in a reverse way.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics