im confused by the way you say less than and type ">" since its supposed to be greater than. I was also confused by the second statement on the for loop is for "Stopping condition" But you used it more like a "run the code while true" instead of a condition to be met, it is a condition to be maintained true for the code to run repeatedly. Please, am I not getting something?
i don'tget why it infenetly looped for you but the reason why you set it to less than or equal is because the for loop keeps going as long as the condition (i
#include int main(){ For(int i =0;i>= 0;i-=2) std::cout>>”this doesn’t even display something”\’n’; //this literally doesn’t do anything I wrote this as an assignment return 0;}
#include
int main()
{
for(int i = 10; i > 0; i--){
//count down to 10
std::cout
Happy new year
It reduces line of codes.
mantab jiwa
#include
int main(){
int count = 0;
char yorn;
std::string name[50];
do{
std::cout > name[count];
std::cout
#include
#include
int main()
{
for (int i = 1; i
#include
int main(){
for(int i=10; i >= 1; i--){
std::cout
Quite don't understand the initialization statement can you help me whats the counter means
can you describe more clearly what you didn't understood. I can help you.
im confused by the way you say less than and type ">" since its supposed to be greater than. I was also confused by the second statement on the for loop is for "Stopping condition" But you used it more like a "run the code while true" instead of a condition to be met, it is a condition to be maintained true for the code to run repeatedly. Please, am I not getting something?
Think he wanted to while 10 is greater than or equal to =0. 10 was I in the code but yeah.
thank you
int main(){
std::string weekDays[7] = {"Monday
", "Tuesday
", "Wednesday
", "Thursday
", "Friday
", "Saturday
", "Sunday
"};
int input;
for (int i = 0; i < 7; i++){
std::cout
How come the stopping condition has to be less than and equal? I used just equal and it infinitely looped it. Why is this?
i don'tget why it infenetly looped for you
but the reason why you set it to less than or equal is because the for loop keeps going as long as the condition (i
Thanks.
#include
int main () {
for (int i=10; i>=1; i-- ) {
std::cout
#include
int main(){
For(int i =0;i>= 0;i-=2)
std::cout>>”this doesn’t even display something”\’n’;
//this literally doesn’t do anything I wrote this as an assignment
return 0;}
you forgot curly bracket
For(int i =0;i>= 0;i-=2){
std::cout>>”this doesn’t even display something”\’n’;
}
@@krustykunal402 thanks man
int main(){
for(int i = 3; i > 0; i--){
std::cout
You're such a huge help
my try:
#include
#include
int main() {
for (int i = 1; i