test - index++; } } while (test!=0){ for (int i=0;...

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

View Full Document Right Arrow Icon
#include <iostream> #include <string> # using namespace std; u int yes=1; int numbers; int count; int test; int index; int numbArray[15]; int main(){ while (yes!=-1){ cin >> numbers; while (numbers!=0){ numbArray[index]=numbers;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: index++; } } while (test!=0){ for (int i=0; i&lt;15; i++){ test=2*numbArray[i]; for (int j=0; j&lt;15; j++){ if (test==numbArray[j]) count++; } } } cout &lt;&lt; count &lt;&lt; endl; cin&gt;&gt; yes; }...
View Full Document

Ask a homework question - tutors are online