Guest User

Untitled

a guest
Nov 22nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. setlocale(LC_ALL,"Russian");
  5. int a[10],i,s,x,j;
  6. cout<<"введите количество чисел "<<endl;
  7. cin>>s;
  8. cout<<"введите числа "<<endl;
  9. for(i=0;i<s;i++){
  10. cin>>x;
  11. a[i]=x;
  12. }
  13. for (i=0;i<s;i++){
  14. for(j=0;j<s;j++){
  15. if ((a[i]%a[j]==0)&&(a[i]!=a[j]))
  16. cout<<a[j]<<" кратно "<<a[i]<<endl;
  17. if((a[i]%a[j]!=0))
  18. cout<<a[j]<<" не кратно "<<a[i]<<endl;
  19. }
  20. }
  21. return 0;
  22. }
Add Comment
Please, Sign In to add comment