Factor divisable by 10

Factor divisable by 10 - { double y = x num2 = num/y if...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <iostream> using namespace std int main() { int num double num2 int counter = 0 cout << "Please enter the number to be factored: " cin >> num for(int x=1 x < num x++)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { double y = x num2 = num/y if (num/x - num2 == 0) { if( (num/x)%10==0) { cout &lt;&lt; num/x &lt;&lt; endl counter++ } } } cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; counter &lt;&lt; endl return 0 }...
View Full Document

Ask a homework question - tutors are online