a001: 哈囉

2022.10.30 PM 11:30 by CBJ

來源 : https://zerojudge.tw/ShowProblem?problemid=a001
出題者 : Zerojudge
標籤 : 基本輸入輸出
難易度 : 0.1
解題想法 : 將字串讀入,並搭配"Hello, "一起輸出
//C language
//solution link(含註解): https://github.com/CBJ0519/CBJsProgramDiary.com/blob/main/zj/a001.c

#include<stdio.h>
int main(){
    char s[100];
    scanf("%s",s); 
    printf("hello, %s\n",s); 
    return 0;
}
//C++ language
//solution link(含註解): https://github.com/CBJ0519/CBJsProgramDiary.com/blob/main/zj/a001.cpp

#include<iostream>
#include<string> 
using namespace std;
int main(){
    string s; 
    cin>>s; 
    cout<<"hello, " + s; 
    return 0;
}
## Python language
## solution link(含註解): https://github.com/CBJ0519/CBJsProgramDiary.com/blob/main/zj/a001.py

s=input() 
print("hello, " + s) 

相關文章

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *