Name: Anonymous 2008-10-07 12:46
Hey /prog/ can anyone tell me what the hell is going on in this program?
#include <iostream>
using namespace std;
void fun (int data);
void mystery(int data);
void main( )
{
int data;
bool start =true;
cout<<"Please enter an integer value : ";
cin>>data;
fun(data);
mystery(data);
}
void fun(int count)
{
char index = count;
while(index >= 0)
{
cout<<index;
index--;
}
}
void mystery(int count)
{
char index = count;
while(index<count)
{
cout<<count;
index++;
}
}
#include <iostream>
using namespace std;
void fun (int data);
void mystery(int data);
void main( )
{
int data;
bool start =true;
cout<<"Please enter an integer value : ";
cin>>data;
fun(data);
mystery(data);
}
void fun(int count)
{
char index = count;
while(index >= 0)
{
cout<<index;
index--;
}
}
void mystery(int count)
{
char index = count;
while(index<count)
{
cout<<count;
index++;
}
}