Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

11

VIEWS: 16 PAGES: 1

									#include<iostream.h> #include<conio.h> int cmmdc(int a, int b) { if(a==b) return a; else if(a>b) return cmmdc(a-b,b); else if (a<b) return cmmdc(a,b-a);} void main() {clrscr(); int n, i; cout<<"n="; cin>>n; for(i=2;i<n;i++) if(cmmdc(n,i)==1) cout<<i<<endl; getch(); }


								
To top