Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> // input/output stream
- #include <fstream> // file stream
- using namespace std;
- int main()
- {
- int niza[10];
- int y=0;
- for(int i=0; i<10; i+=1){
- cin>>niza[i];
- }
- for(int u=0; u<10; u+=1){
- niza[u]%=42;
- }
- for(int o=0; o<10; o+=1){
- for(int l=o+1; l<10; l+=1){
- if(niza[o]>niza[l]){
- swap(niza[o],niza[l]);
- }
- }
- }
- for(int i=0; i<10; i+=1){
- if(niza[i]==niza[i+1]){
- y+=0;
- }
- else if (niza[i]!=niza[i+1]){
- y+=1;
- }
- }
- cout<<y;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment