Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// re3(9).cpp
- /* write a program to prompt the user to enter any 10 numbers and must calculate the mode of the given
- set of numbers and display it */
- // mode: the number which appears the most frequently
- #include<iostream>
- #include<conio.h>
- #include<stdio.h>
- int punc(int,int);
- using namespace std;
- int main()
- {
- int numbers[9],modee[9];
- puts("this program will display the mode of the numbers entered by the user");
- for(int nikki;nikki<=10;nikki++){cin>>numbers[nikki];}
- for (int kaya;kaya<=9;kaya++){
- modee[kaya]=punc(numbers[kaya],numbers[]);}
- for(int disa=0;disa<=9;disa++){cout<<modee[disa];}
- }
- int punc(int kala,int neela[]){int bypee=0;
- for (int lolo;lolo<=10;lolo++){
- if(kala==neela){bypee++;}
- else{}
- return bypee;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement