0 LIKES LikeUnLike
Hi there, I just need abit of troubleshooting for this code.#include <cstdlib>#include <ctime>#include <iostream>int main(){srand((unsigned)time(0));int random_integer;for(int index=0; index<20; index++){random_integer = (rand()%10)+1;cout << random_integer << endl;}}Can I ask what's wrong with this code, people?It keeps telling me that cout and endl are undeclaredindentifiers, which doesn't make sense to me :(
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 2 answers.