Created
November 20, 2018 14:02
-
-
Save KeitetsuWorks/aecb659e8ea23d24e601a023ade52fd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file q11199328296.cpp | |
| * @brief q11199328296 | |
| * @author Keitetsu | |
| * @date 2018/11/20 | |
| * @copyright Copyright (c) 2018 Keitetsu | |
| * @par License | |
| * This software is released under the MIT License. | |
| */ | |
| #include <cstdio> | |
| int main(void) | |
| { | |
| int line_num; | |
| int i, j; | |
| fprintf(stdout, "行を入力: "); | |
| scanf("%d", &line_num); | |
| i = 0; | |
| while (i < line_num) { | |
| j = 0; | |
| while (j < line_num) { | |
| if (j < (line_num - 1 - i)) { | |
| fprintf(stdout, " "); | |
| } | |
| else { | |
| fprintf(stdout, "*"); | |
| } | |
| j++; | |
| } | |
| fprintf(stdout, "\n"); | |
| i++; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment