這是一個程序打印一個方形的side =整數由一個字符組成。 對於例如:如果輸入的字符輸出爲#: 但是它不讀取用戶輸入,並且因此也未能將其打印在正方形。 請參見下面的代碼: //printing of square of any character problem 5.20
#include<stdio.h>
int main(void)
{
int i, h;
我想讓我的程序使用帶有getchar的命令行參數來編碼消息。我的問題是,getchar只關注程序執行後輸入的內容。我怎樣才能讓它讀取命令行參數呢? #include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int pin, charin, charout;
// this veri