SirChregeli
0
Q:

for c++

#include <iostream>

using namespace std;

int main(){
 
  int i; //initialize integer
  //i starts at 0 and stops at 4, as 5 is not < 5
  for (i = 0; i < 5; i++){ //i++ means add 1 to i each iteration
    cout << "number " + i << endl; //print 5 times
  }
  return 0;
}
//output:
/*
number 0
number 1
number 2
number 3
number 4
*/
4

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

  
1

for (int i=0; i<10; ++i);

0
for (int i = 0; i < 7; i++)
{
	cout << i << endl;
}
0
#include <iostream>
#include <stdlib.h>

/*====================================
*           eXcript.com
*          fb.com/eXcript
* ====================================*/

using namespace std;

int main() {
    for(int i = 0; i <= 10; i++){
        cout << "O valor de i eh igual: " << i << endl;
    }

    system("pause");
    return 0;
}
0

New to Communities?

Join the community