i want to replace the prime numbers by 0 my code is not working

This is a discussion on i want to replace the prime numbers by 0 my code is not working within the C++ Programming forums, part of the General Programming Boards category; Code:
#include<fstream.h>
#include<iostream.h>
void main()
{ int k=0;
fstream f;
f.open("num.txt",ios::in|ios::out);
for(int i=1;i<=100;i++)
{
f<<i;
for(int j=2;j<i/2;j++)
{
if(i&#37;j==0)
continue;
...

Not to mention that you are using fstream.h and iostream.h which are deprecated header files, use fstream and iostream (without .h) instead. You should also tell us what you are trying to do *in details*, what your code does instead, what you have tried to do to fix it (if it doesn't work) or what you have tried to do to implement it, if you have troubles figuring how to code whatever you are trying to code. Just don't put unformatted code bluntly like that, you won't get much from us that way. It's considered quite rude on programming forums.