6. A diamond

Title description

Please write a program to use the output command to output a rhombus on the plane. For the specific shape, please refer to the output sample below.

note:

There are 7 lines in total, each line has a new line, there can be no extra blank lines between the lines;

There should be no extra spaces after the asterisk at the end of the line;

There should be no spaces between the asterisks.

Input and output format

Input format

no

Output format

no

Sample input and output

Input sample

no

Sample output

   *
  ***
 *****
*******
 *****
  ***
   *

answer

Water question~
Code Man! Come here!

Code

#include<bits/stdc++.h>
using namespace std;
int main(){
    
    
	printf("   *\n  ***\n *****\n*******\n *****\n  ***\n   *");
	return 0;
}

Excellent or bad? ( ̄ ▽  ̄) /

Guess you like

Origin blog.csdn.net/JPY_Ponny/article/details/114195284