0

大学で処理の勉強を始めたばかりなのですが、残念ながら最初の数回の講義を欠席してしまったので、教科書を手元に置いて独学で学んでいます。あなたは私の命を救うでしょう。ちょっと..ありがとう:D

これは質問です:

次の変数を宣言し、その値で初期化するプログラムを作成します。異なるサブセクションを区切るために、プログラムにコメントを追加します。私。noOfstudents = 50 ii. 試験マーク = -50
iii. priceOfShoes = 59.99 iv。収入 = 10,750.99 v. greetingMessage='こんにちは' vi. アルファベット = 'A'

vii lossOfIncome = -20.30
viii sum=0.0000000000076

これが質問のために入力したコードです。

void setup() {
int noOfStudents;
noOfStudents = 50; //Number of Students
float examMark;
examMark = -50; // Exam Mark
float shoePrice;
shoePrice = 59.99; // The price of the shoes
double income;
income = 10750.99; // The income
print ("hello world"); //displays hello world
char message;
message = 'A'; //displays the character A

float lossOfIncome = -20.30;
double lossOfIncome2 = 0.0000000000076; //The loss of income

}
4

1 に答える 1

0

変数を 1 行で宣言して初期化することができますint noOfStudents = 50;。また、print()メソッドを使用しています。String変数型を使用する可能性が高くなります。

Ch. もご覧になることをお勧めします。ダニエル・シフマンの学習処理の本、または少なくともchの例の4。4オンライン。

http://www.learningprocessing.com/examples/

于 2012-10-24T00:46:02.467 に答える