Ответ:
# include <iostream>
# include <stdio.h>
void main(void)
{ float k; int l,n;
l=0;
std::cout<<"ww chislo n=";
std::cin>>n;
for(int i=2;i<n-1;i++){
k=n/i;
if (k==int(k))
l=l+1;
else
l=l;
}
if (l>=1)
std::cout<<"chislo ne proste";
std::cout<<"chislo n="<<n<<" proste";
getchar();getchar();
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
# include <iostream>
# include <stdio.h>
void main(void)
{ float k; int l,n;
l=0;
std::cout<<"ww chislo n=";
std::cin>>n;
for(int i=2;i<n-1;i++){
k=n/i;
if (k==int(k))
l=l+1;
else
l=l;
}
if (l>=1)
std::cout<<"chislo ne proste";
else
std::cout<<"chislo n="<<n<<" proste";
getchar();getchar();
}