Answer to Question #163260 in C++ for zain ul abdeen

Question #163260

Write a program to write the frequency of the number in an array of size 50 whose values are from 0 to 10.


1
Expert's answer
2021-02-12T03:37:28-0500
#include<iostream.h>

int main(){
int    freg[10],j=0;
    for(int i=0;i<=10;++i){
        cin>>freg[i];
        if(freg[i]<=10 && freg[i]>=0){
        
        j=j+1;
        }
    
    
}
    
cout<<"frequence="<<j<<endl;    
    
    
    
return 0;}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment