C語言實驗 字元編碼

2021-09-11 02:41:53 字數 451 閱讀 8609

problem description

請將一串長度為5的純字母文字譯成乙個密碼,密碼規律如下:用原來的字母後面的第4個字母代替原來的字母。如c用g代替(文字中不存在w/w、x/x、y/y、z/z等字母),最後得到的文字即為密碼。

input

輸入一串文字,長度固定為5。

output

輸出對應的密碼。格式為:

password is 密碼

sample input

china
sample output

password is glmre
參考**

#include

#include

int main()

printf("password is %s",str);

printf("\n");

return 0;

}

C語言實驗 刪除指定字元

problem description 從鍵盤輸入乙個字串給str和乙個字元給c,刪除str中的所有字元c並輸出刪除後的字串str。input 第一行是乙個字串,不超過100個字元 第二行是乙個字元。output 刪除指定字元後的字串。example input sdf sdf example ou...

C語言實驗 排列

c語言實驗 排列 time limit 1000ms memory limit 65536kb problem description 有4個互不相同的數字,請按序輸出由其中三個不重複數字組成的排列。input 4個整數。output 所有排列,輸出順序見樣例。example input 1 2 3...

C語言 實驗整理

實驗二 陣列操作 實驗三 呼叫函式 實驗四 指標,處理字串 課程設計 銷售業績管理系統 感想 題目求1 1 2 1 3 1 4 1 99 1 100之值。求出200到300之間的數,且滿足條件 它們三個數字之積為42 三個數字之和為12。一 include intmain printf f sum ...