ぼるじょあがC/C++の宿題を片づけますYO! 67代目at TECH
ぼるじょあがC/C++の宿題を片づけますYO! 67代目 - 暇つぶし2ch23:homoじょあ ◆5OLf4yFnuM
06/12/11 20:53:00
>>20
#include<stdio.h>
#include<stdlib.h>
#define N 10

int func(int n);
int main(void){
printf("%d\n", func(N));
return EXIT_SUCCESS;
}

int func(int n){
if(n== 1 || n== 2)return 1;
return func(n-1) + func(n-2);
}

#include<stdio.h>
#include<stdlib.h>
#define MIN 0.0
#define MAX 10.0
#define SPAN 0.1

int main(void){
double cnt;
for(cnt=MIN; cnt<MAX; cnt+=SPAN){
double ans;
ans = cnt*cnt+cnt+1.0;
printf("x = %f y = %f\n",cnt, ans);
}
return EXIT_SUCCESS;
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch