Latest web development tutorials

C Exercise Example 6

100 cases of classic C language 100 cases of classic C language

Title: * outputs with the letter C pattern.

Program analysis: first with '*' numbers on paper to write the letter C, and then branch output.

Source Code:

//  Created by www.w3big.com on 15/11/9.
//  Copyright © 2015年 本教程. All rights reserved.
//

#include "stdio.h"
int main()
{
    printf("用 * 号输出字母 C!\n");
    printf(" ****\n");
    printf(" *\n");
    printf(" * \n");
    printf(" ****\n");
}

The above example output is:

用 * 号输出字母 C!
 ****
 *
 * 
 ****

100 cases of classic C language 100 cases of classic C language