Week 7 task-use an asterisk chart to experience cyclic structure programming

Source: Internet
Author: User
/** 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.