有關C++程式碼的寫法

各位大大,請問有人會寫C++的程式碼嗎?? 可不可以幫小弟一下?? 這是我上課後要做的練習... 但是我不會做丫.... 請各位大大幫忙 Exercise 2 : Using while and do/while Repeat the above exercise using both a while statement and a do/while statement. Exercise 3 : getch & putchar Use these above functions to write a program that echo's what you type... 顯示更多 各位大大,請問有人會寫C++的程式碼嗎??
可不可以幫小弟一下??
這是我上課後要做的練習...
但是我不會做丫....
請各位大大幫忙

Exercise 2 : Using while and do/while


Repeat the above exercise using both a while statement and a do/while statement.


Exercise 3 : getch & putchar

Use these above functions to write a program that echo's what you type to the screen. The program is to terminate when the 'Q' key is pressed


Exercise 4 :

Write a short menu style program that responds to the keys you press. The following are the 'rules' for the program

Key pressedAction

adisplay Hello, how are you on the screen
bdisplay This is software engineering at its best on the screen
cdisplay a count of the numbers of key presses so far
qquit the program

<none of the above>display You have made an odd selection on the screen

Hint: This program is basically just 'if , else if, else if, else .. ' with a while loop and a counter thrown in for good measure.
更新: Exercise 1 : Using for

Write a short program that counts from one to ten (inclusive), and calculates the sum of these values, this value to be displayed on the screen.
4 個解答 4