well i have finally solved my problem! woooohoooo!
now here is my question try to uncomment that while loop with the two statments and try using it... why does it not work when it is compund statement? any way to fix this?
Code:
#include <iostream.h>
int main()
{
int number1;
int number2;
int stonum;
int count=0;
int num1;
int num2;
cout<<"Enter one single-digit number: ";
cin>>number1;
cout<<"Enter one single-digit number: ";
cin>>number2;
cout<<endl;
cout<<number1<<" "<<number2;
//while ((number1!=num1)&&(number2!=num2))
while(number2!=num2)
{
if (count<1)
{
num1=number1;
num2=number2;
}
count++;
stonum=((num1+num2)%10);
cout<<" "<<stonum;
num1=num2;
num2=stonum;
}
cout<<endl;
return (0);
}