Today is our first class with C in college. After introducing the language, our lecturer said us to write some programs and we did that. She also asked me to try to write a program that uses 100% CPU. My initial thought was using a non-termination while loop, so I wrote this program.
int main()
{
while (1){}
}
This only produced 50% of load on my dual core cpu. So I think that it is using only core. So I need a way to make it work on all the cores at the same time. How can I achieve this?