@UFO/dolaniklik
C++

No description

repl talk
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
#include <stdio.h>
using namespace std;
 int main() {
 int an[100];  int i, ak, c, a, x ;
 int t, m,j,l;  int ka,kb;
 int ax[100];  int ay[100];
 x=30; ak=2; an[1]=1;an[2]=2;
 an[3]=3; c=3;t=2;a=5;i=1;
 while (c<x) {   i=1 ;t=2;
 while (t<a) {
 i++; m=a % an[i]; 
 if (m==0) { a=a+2; i=1;}
 t=an[i]*an[i]; }
 c++;an[c]=a;a=a+2;  }
 t=0;for (i=1;i<x;i++) {
 std:: cout<<i<<":"<< an[i]<<" ";t++;
 if (t==12) { std:: cout<<i<<" : "<< an[i]<<endl;t=0;}
 } cout<<endl; printf(" birinci sayı gir");scanf("%d",&ka);
 printf(" ikinci sayı gir");scanf("%d",&kb);
 
 for (i=2;i<13;i++)  {
 ax[i]=ka%an[i]; ay[i]=kb%an[i];   x=ax[i];
 if (ax[i]>ay[i]) { ax[i]=ay[i];ay[i]=x; }
 cout<<i<<" : "<< an[i]<<" = "<<ax[i]<<" : "<<ay[i]<<endl; }
 cout<<endl;  for (j=1;j<2310;j++)  {  t=0;
 for (i=2;i<12;i++)  {
 if (j%an[i]==ax[i] || j%an[i]==ay[i] ) t++;  }
 if (t>8) cout<<t<<" : "<< j<<endl  ;  }   }
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
gcc version 4.6.3