[HANZam] commented on a Page, C++ variable use  -  Aug 04, 2009

@ChunkieMonkey

in my opinion your declaring Z as your 1st number and X as 2nd number but your condition said Z=X*Y.. better change your inputs very well..that's all.

and for you Zmodem

include

using namespace std;

int main()
{
int num1,num2,product;
cout << "Enter first number: ";
cin >> num1;
cout << "Enter second number: ";
cin >> num2;
product = num1 * num2;
cout << "The product is: " << product << endl;
system("pause");
return 0;
}

better change it dude..

int num1,num2,product;>>> to double num1,num2,product;

cause integers are declaring only a single variable..

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.