C 的程式,更改密碼。很簡單,但我初學者。不懂啊

時間 2021-05-07 20:00:12

1樓:匿名使用者

結果是能調出來,但還是有些地方需要改進.總感覺亂.你自己理解下。把那最初的密碼設定為全域性變數.後面有些地方可以修改簡化.你好好看下吧.

#include

using namespace std;

int password;

int pass( )

else

cout<<"輸入錯誤,";

}cout<<"錯誤次數已達最高上限!"<>choice;

}while(1>choice||2>b;

cout<<"請輸入新密碼:"<>c;

cout<<"請再次輸入新密碼:"<>d;

if(d!=c)

else if(b!=a)

//else

else

return 0;

}//主函式

int main()

else

switch(menu())

return 0;}

2樓:匿名使用者

password==c; "=="是比較相等的 不是賦值,要想給password從新賦值 要用「=」。

這段** 還有一些其他的問題 細心點就好了為什麼要pass(password)==c 這樣寫啊編譯應該通不過吧

c++編譯密碼

3樓:匿名使用者

while(s[i])//逐字元檢查

if(s[i]>='a')

if(s[i]<'x')

s[i]+=3;

else

if(s[i]<='z')

s[i]-=23;

大寫字母的處理邏輯同上

4樓:燕歸來

#include

#include

int main(void)

;char s[10];

int i;

for(i=0;i<(int)strlen(str);i++)s[i]='\0';

puts(s);

return 0;}

用c語言程式設計愷撒密碼加密解密程式

這個我之前寫過 未加密文字 the butcher the baker and the candlestick maker。屠夫 麵包師和蠟燭匠 關鍵金鑰 big bigbigb igb igbig big big bigbigbigbi gbigb 加密文字 upk cczdpks bnf jgl...

簡單的C 程式,簡單的C 程式

include include using namespace std define maxn 1000 struct studentstu maxn int main while 1 stu maxn int main while 1 if i n cout 沒找到!n return 0 其實上面...

c 程式的問題

1 這個是c 虛擬函式實現動態多型性的測試程式。2 但是你如果不理解class base和class derive的話,我想還是應該看一些c 基礎教程裡的類這一章。3 這是物件導向程式的基本構成元素 類 4 其他解釋也是多餘。我覺得你應該看看基礎的東西。畢竟學習時循序漸進的!結果為 f1derive...