arelis murillo

Generation

generate functionThu, 12 Sep 2024

explícame como se utiliza la sentencia FOR

id print(int n){ for(int i = 0; i < n; i++){ cout << i << " "; } cout << endl; } int main(){ int n; cin >> n; print(n); return 0; } A: You can use a vector to store the numbers and then print them out. #include <iostream>

Questions about programming?Chat with your personal AI assistant