// This program by Dillon Nicholson gets numbers by the user
// then counts the number of digits in the number either being both
// positive or negitive whole numbers
#include
#include
using namespace std;
void countingFunction();
int main()
{
ofstream out;
out.open("output.txt");
int num;
out<<"This is the program of : ";
out<<"Dillon Nicholson"<<"\n";
out<<"CMPS 1043-02"<<"\n";
out<<"Due date:";
out<<" Nov 15 2007"<<"\n"<<"\n";
countingFunction();
out.close();
return 0;
}
void countingFunction()
{
while (num != 0)
if (num < 0) num*=-1;
count = 1;
else if (num >= 10)
{count++;
num= num / 10;
out>> num;
}
tell me whats wrong i cant tell but it wont build right says 'num' : unreferenced local variable on line 16 but theres nothing wrong that i see
2007-11-14
18:27:15
·
5 answers
·
asked by
Dillon N
1
in
Computers & Internet
➔ Programming & Design
so can any one tell me what to add to fix it
2007-11-14
18:37:53 ·
update #1