hey guys i have been an avid reader of the forums here but havnt gotten a membership until now becuase i had this problem that has puzzled me. i was working on modifying this program to go in a decreasing fashion. i couldnt do it hardcoded or with user defined variables. i dont know why it wasnt working probibly some really big flaw that i missed as a newb.
Code:
#include <iostream>
#include <stdlib.h>
using namespace std;
int star(int x)
{
for (int y=1;y<=x;++x)
{
cout<<"*";}
}
int negastar(int x)
{
for (int y=1;x>y;x-1)
{
cout<<"*";
}
}
int main()
{
int x;
for (x=0;x<10;x++)
{
star(x);
cout<<"\n";
}
while(x>1)
{
negastar(x);
cout<<"\n";
}
system("pause");
return 0;
}
im using dev-c++ from bloodshed with the latest updates and everything and i dont think its a software problem. thanks for all the help in advance