Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- setlocale(LC_ALL,"Russian");
- int a[10],i,s,x,j;
- cout<<"введите количество чисел "<<endl;
- cin>>s;
- cout<<"введите числа "<<endl;
- for(i=0;i<s;i++){
- cin>>x;
- a[i]=x;
- }
- for (i=0;i<s;i++){
- for(j=0;j<s;j++){
- if ((a[i]%a[j]==0)&&(a[i]!=a[j]))
- cout<<a[j]<<" кратно "<<a[i]<<endl;
- if((a[i]%a[j]!=0))
- cout<<a[j]<<" не кратно "<<a[i]<<endl;
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment