output problem

1 reply [Last post]
shivedita
Offline
Last seen: 5 years 15 weeks ago
Joined: 2014-07-28
bOt Points: 58

#include
using namespace std;
int main()
{
int i,d,j;
int c=0;
d=100;
for(i=1;i {
for(j=1;j {
if(i%j!=0)
c++;
}
}
cout<<"c";
}

shivedita
Offline
Last seen: 5 years 15 weeks ago
Joined: 2014-07-28
bOt Points: 58
line for will be

 for(i=1;i<100;i++)

add

for(j=1;j<i;j++)