intさわだんのBlack History

刹那的レジェンドになりたい。

課題系

発展課題集

・発展1 #include <stdio.h> int main() { int M,N,m,n,tmpn; printf("[Computing GCD] Please input two integers : "); scanf("%d%d",&M,&N); if(M >= N)m = M,n = N; else n = M,m = N; while(n){ tmpn = n; n = m % n; m = tmpn; } printf("GCD of %d and %d : %d</stdio.h>…

発展3

#include <stdio.h> int main() { int r,N,i; printf("Please input two integers as radius and resolutin : "); scanf("%d%d",&r,&N); double ans = 0,sa = ( (double)r / (double)N ),nau = 0,pai = 3.141592653589793238462643383279; for(i = 1;i <= N;i++){ nau</stdio.h>…

発展課題2

ほかにもたくさんやりかたあります 説明 N = 849259のとき nauの値を 849259 84925 8492 849 84 8 とfor文で変更していき、各値を10で割ったあまりをsumに加えていく解法。 #include <stdio.h> int main() { int N; printf("Please input an integer N : "); scanf("%</stdio.h>…