Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Combining Structs and Enums | Enumerations in C++
C++ Structures and Enumerations
セクション 3.  4
single

single

bookChallenge: Combining Structs and Enums

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

Define a struct named Student that contains an enum Level with the values Freshman, Sophomore, Junior, Senior and a member variable level of type Level. Write a function named isSenior that takes a Student object as a parameter and returns true if the student's level is Senior, otherwise returns false. In the main function, create a Student with the level set to Senior and another with the level set to Junior. Print the result of calling isSenior for both students using the format: "Is the student a senior? {result}", where {result} is true or false.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  4
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt