I kept creating an infinite loop...
Intro level problem; should be easy
Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0.
User Profile
Collapse
-
I don't even know where to start
Intro level problem; should be easy
Given an int variable k that has already been declared, use a while loop to print a single line consisting of 97 asterisks. Use no variables other than k . -
what does it want me to do?
Given the char variable c , write an expression that is true if and only if c does not contain a blank. -
evaluates to true
how do I write this out? If I type the word "true" it keeps rejecting it.... ??
Once again, this is intro level so it should be very easy
Write an expression that evaluates to true if and only if the value of the boolean variable workedOvertime is true. -
toggles the value?
How do I do this? This is a basic computer programming question, so it should be very easy.
Write a statement that toggles the value of onOffSwitch . That is, if onOffSwitch is false, its value is changed to true; if onOffSwitch is true, its value is changed to false.
No activity results to display
Show More