Click here to Skip to main content
14,933,227 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Declare a bool variable to represent whether or not it is raining and set it to the appropriate value for the condition of not raining, print the variable with a proper label

What I have tried:

I can't really figure this out so I haven't tried anything yet
Posted
Updated 10-Jun-21 13:50pm
Comments
KarstenK 10-Jun-21 11:07am
   
ask som dudes in the net: "plz gimme code" ... ;-)
Patrice T 10-Jun-21 13:06pm
   
"How would I do this?"
What about learning C++ ?

   
this is my simple guess from what you said,
#include <iostream>
using namespace std;

int main()
{
	bool isRainning = true;

	if (isRainning == true)
		cout << "it is rainning now" << endl;
	else
		cout << "it is not rainning" << endl;

		return 0;
}
   
Comments
merano99 10-Jun-21 20:19pm
   
"set it to the appropriate value for the condition of not raining ..."
You screwed up.
Timothy Stone 2021 11-Jun-21 9:53am
   
Thank you all for your help. :)
[no name] 11-Jun-21 15:30pm
   
Don't see why such a "bad" answer get three (higher rep members) upvotes. Must be from three (higher rep) members which do not have a clue about bool like you.

"if (isRainning == true)" is a no go for me!

Seems to confirm the swamp in CP

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900