test - index while(test!=0 for(int i=0 i<15 i...

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<15; i++){ test=2*numbArray[i]; for (int j=0; j<15; j++){ if (test==numbArray[j]) count++; } } } cout << count << endl; cin>> yes; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online