/** Copyright (c) 2012, School of Computer Science, Yantai University * All rights reserved. * Author: Zhao guanzhe * Completion Date: July 15, October 9, 2012 * version number: v1.0 ** input Description: asterisks * Problem description: omitted * program output: omitted * problem analysis: slightly * Algorithm Design: slightly */# include <iostream> using namespace std; int main () {int I, j; I = 1; while (I <= 7) {for (j = 0; j <= 12-2 * I; ++ j) cout <"*"; cout <endl; ++ I ;} cout <endl ;}
Running result:
Experience:
You are not sure about the asterisks, and there are many errors. I really don't know how to debug it. So I thought of the most stupid and simplest method. I tried to simulate the example given by the teacher, and then I made continuous debugging and modifications according to the requirements of the asterisk chart, finally, I made it .... Hahaha