🔒 Closed Patulongg mga paps, tama ba to?

Status
Not open for further replies.

Licht01

Eternal Poster
Use a counter named count that has an initial value of 1, a final value of 100, and an increment of 5


#include<iostream>
using namespace std;
int main()
{
int count = 1;

for (int count = 0; count <= 100;count = count + 5 )
{
cout << count <<"\n";
}

return 0;
}


tama po ba or may iba pa pong solution?
 
Dapat 101 value mo

C++:
#include <iostream>

int main() {
    int count = 1;

  for (count = 1; count < 101; count+=5)
  {
    std::cout<<" "<<count;
  }

    return 0;
}
 
Dapat 101 value mo

C++:
#include <iostream>

int main() {
    int count = 1;

  for (count = 1; count < 101; count+=5)
  {
    std::cout<<" "<<count;
  }

    return 0;
}
ganun pa den boss e 96 pa den final number niya

UPDATE: Okay na po solution ko hehe thanks po sa mga idea niyo
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 3
    Replies
  • 569
    Views
  • 2
    Participants
Last reply from:
Phc-Joshua

Online now

Members online
459
Guests online
1,268
Total visitors
1,727

Forum statistics

Threads
2,277,853
Posts
28,979,294
Members
1,229,112
Latest member
rosearugay
Back
Top