Write an algorithm that counts the number of occurrances of a particular number from a given list of numbers.
1
Expert's answer
2010-10-28T12:38:08-0400
#include <iostream.h> #define N=5 //counts of list of occuarences numbers #define K=5 //counts of list numbers main(){ int i, n, s;// s - counts the number of occurrances int q;// simple variable int a[N];// list of occuarences numbers int b[K];// list of numbers s=0; cout<<"Write a list of numbers"; for(i=1; i<=K; i++) {cin>>q; b[i]=q;}
cout<<"Write a list of occuarences numbers"; for(i=1; i<=N; i++) {cin>>q; a[i]=q;}
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment