- 1

Perchè nel ciclo for l'int è uguale a 1 e non zero??

Non capisco perchè il ciclo for parte da 1...

9th Aug 2017, 8:51 AM
Jonah Giglio
Jonah Giglio - avatar
4 odpowiedzi
+ 6
Translation: Why in the loop for int is equal to 1 and not zero ?? I do not understand why the cycle for part from 1 ...
9th Aug 2017, 8:59 AM
jay
jay - avatar
+ 4
i wanna help you, could u say ur question in English?😊
9th Aug 2017, 8:53 AM
RiGeL
RiGeL - avatar
+ 4
@jay thank you
9th Aug 2017, 9:05 AM
RiGeL
RiGeL - avatar
+ 3
@jonah i think you can start the (int) with any number and it will just run well, just like this example: #include <iostream> using namespace std; int main() { for(int i=0;i<6;i++){ cout<<i<<endl; } return 0; } the int starts from 0 and the output will be: 0 1 2 3 4 5
9th Aug 2017, 9:08 AM
RiGeL
RiGeL - avatar