Offline
Online
Viewers 0

If , Then, Else, Else-If, Bools, And, Or, Not, Huh?

What is the last thing you learned?

The last thing I learned was if-then conditional statements when programming in C++. For example, if I want to write a statement in a program that says something like “if today’s WordPress Daily Prompt has been answered, then print ‘Answered’ on the Jetpack app Home page. If it hasn’t been answered, then print ‘Answer prompt'”. Then I would code it in C++ like this:

if (dailyPromptAnswered) {
    std::cout << "Answered" << std::endl;
} else {
    std::cout << "Answer prompt" << std::endl;
}

And with that, I don’t want to talk about it anymore lol. Not a very exciting daily prompt for me today 😆

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Discover more from Eve in The City 🗽 (archived)

Subscribe now to keep reading and get access to the full archive.

Continue reading