Help with While looping

I am really new to programming and I need help with writing a while USING A LOOP, subtract all of the numbers between -5 and -44.
Are You Expecting Us To Do Your Homework For You?
Give Us What You Have So Far And Tell Us The Errors You're Having And Then We Can Help You.
I agree with HBehbahani but here are some code - you must modify something to work for you..
it will not help you for your exam if you do not learn...


#include<iostream>
using namespace std;

int main()
{
int a=-6;
int b=-10;
int rezultat=-6;
while(a>b)
{
a--;
rezultat=rezultat-a;
cout<<rezultat<<endl;
}
cout<<rezultat<<endl;

return 0;
}
Topic archived. No new replies allowed.