this program isn't working and i don't know why?

#include <cstdio>
int main(){
int s=12;
int c=0;
int l=1;
freopen("hallin.txt","r",stdin);
freopen("hallout.txt","w",stdout);
scanf("%d",&s);
while(s>0){
s-l;
l++;
c++;
}
printf("%d",c);
return 0;
}
What do you want to do ?
closed account (z05DSL3A)
Line 10, s-l;, is not doing anything.
Last edited on
Topic archived. No new replies allowed.