練習5-3 數字金字塔

練習5-3 數字金字塔   (15分)c++ 本題要求實現函數輸出n行數字金字塔。函數 函數接口定義: void pyramid( int n ); 其中n是用戶傳入的參數,爲[1, 9]的正整數。要求函數按照如樣例所示的格式打印出n行數字金字塔。注測試 意每一個數字後面跟一個空格。spa 裁判測試程序樣例: #include <stdio.h> void pyramid( int n );
相關文章
相關標籤/搜索