りゅうちゃん@hパラメータ No title
No License C++
2020年09月14日
Copy Clone
#include "stdio.h"
#include "stdlib.h"
#include "math.h"

int main() {
	double sum, ave, max, sd, devi;
	int count;
	int rand_nums [10];

	//変数初期化
	sum = 0, ave = 0, max = 0, sd = 0, devi = 0;

	//乱数配列 --1から100の乱数--
	srand(100);
	for (count = 0; count < 10; count++) {
		rand_nums [count] = rand() % 100 +1;
	}

	//##############################################################

	//合計
	for (count = 0; count < 10; count++) {
		sum += rand_nums [count];
	}

	//平均
	ave = sum / 10;

	//最大
	max = rand_nums[0];
	for (count = 1; count < 10; count++) {
		if (max < rand_nums [count]) {
			max = rand_nums[count];
		}
	}

	//標準偏差
	for (count = 0; count < 10; count++) {
		devi += pow((rand_nums [count] - ave),2);
	}
	sd = sqrt(devi / 10);

	//##############################################################

	//表示
	printf("乱数:");
	for (count = 0; count < 10; count++) {
		printf("%d,", rand_nums [count]);
	}
	printf("\n合計:%lf\n平均:%lf\n最大:%lf\n標準偏差:%lf\n", sum, ave, max, sd);

	return 0;
}
#include "stdio.h"
#include "stdlib.h"
#include "math.h"

int main() {
	double sum, ave, max, sd, devi;
	int count;
	int rand_nums [10];

	//変数初期化
	sum = 0, ave = 0, max = 0, sd = 0, devi = 0;

	//乱数配列 --1から100の乱数--
	srand(100);
	for (count = 0; count < 10; count++) {
		rand_nums [count] = rand() % 100 +1;
	}

	//##############################################################

	//合計
	for (count = 0; count < 10; count++) {
		sum += rand_nums [count];
	}

	//平均
	ave = sum / 10;

	//最大
	max = rand_nums[0];
	for (count = 1; count < 10; count++) {
		if (max < rand_nums [count]) {
			max = rand_nums[count];
		}
	}

	//標準偏差
	for (count = 0; count < 10; count++) {
		devi += pow((rand_nums [count] - ave),2);
	}
	sd = sqrt(devi / 10);

	//##############################################################

	//表示
	printf("乱数:");
	for (count = 0; count < 10; count++) {
		printf("%d,", rand_nums [count]);
	}
	printf("\n合計:%lf\n平均:%lf\n最大:%lf\n標準偏差:%lf\n", sum, ave, max, sd);

	return 0;
}
anonymous
Anonymous
2021年04月27日
Medicine prescribing information. Generic Name. <a href="https://toplyrica.top">generic lyrica for sale</a> in Canada Everything trends of meds. Get here.
anonymous
Anonymous
2021年04月29日
Meds information sheet. What side effects? <a href="https://pregabalinfor.top">order generic lyrica without prescription</a> in the USA Everything information about meds. Get information now.
anonymous
Anonymous
2021年04月30日
cialis dosage 20mg <a href="https://mycialistabs.com/">buying cialis online safely</a> cialis bathtub
anonymous
Anonymous
2021年04月30日
cialis for sale online in canada <a href="https://mycialistabs.com/">viagra vs cialis hardness</a> canadian online pharmacy cialis
anonymous
Anonymous
2021年05月01日
coupons for cialis 5mg <a href="https://toptadalafiltabs.com/">best time to take cialis</a> cialis otc usa
anonymous
Anonymous
2021年05月02日
liquid cialis <a href="https://toptadalafiltabs.com/">cialis price per pill</a> normal dose of cialis
anonymous
Anonymous
2021年05月04日
how to write a header for an essay <a href="https://topessaywriterfas.com/">online essay writing</a> creative ways to write an essay
anonymous
Anonymous
2021年05月04日
how to write a lyric essay <a href="https://topessaywriterfas.com/">write a reflection essay</a> how to write a research essay introduction
anonymous
Anonymous
2021年05月06日
best essay writong service <a href="http://writemyessayslfd.com/">creative writing essay</a> find professional essay writing service
anonymous
Anonymous
2021年05月06日
memphis essay writing service <a href="http://writemyessayslfd.com/">writing a essay</a> ap synthesis essay postal service
anonymous
Anonymous
2021年05月06日
generic viagra walmart <a href="https://mrviagrashop.com">viagra 150 mg</a> viagra connect
anonymous
Anonymous
2021年05月07日
viagra discount <a href="https://mrviagrashop.com">sildenafil prices</a> walgreens generic viagra
anonymous
Anonymous
2021年05月07日
sildenafil tablets <a href="https://mysildenafilkr.com/">pfizer viagra</a> buy sildenafil online usa
anonymous
Anonymous
2021年05月07日
sildenafil over the counter usa <a href="https://mysildenafilkr.com/">viagra near me</a> buying viagra online legal
anonymous
Anonymous
2021年05月11日
cialis for daily use side effects <a href="http://tadalafilled.com/">cialis side effects a wifes perspective</a> cheap generic cialis
anonymous
Anonymous
2021年05月11日
it project manager resume <a href="http://coverletterforresumetop.com/">entry level cover letter</a> objective for a resume
anonymous
Anonymous
2021年05月11日
cialis otc switch <a href="http://tadalafilled.com/">how long does it take cialis to work</a> is generic cialis available in canada
anonymous
Anonymous
2021年05月11日
resume website <a href="http://coverletterforresumetop.com/">professional cv help</a> who to address cover letter to if unknown
anonymous
Anonymous
2021年05月12日
resume headings <a href="https://writingacoverletteronline.com/">best resume websites</a> cover letter administrative assistant
anonymous
Anonymous
2021年05月12日
social media manager resume <a href="https://writingacoverletteronline.com/">writing a professional cover letter</a> architect resume
anonymous
Anonymous
2021年05月13日
low price viagra <a href="https://edviagramaster.net/">viagra on steroids</a> viagra connect
anonymous
Anonymous
2021年05月13日
lovely lilith viagra falls <a href="https://edviagramaster.net/">sildenafil viagra</a> viagra foods
anonymous
Anonymous
2021年05月15日
viagra online <a href="https://sildenafilviagratop.com">canadian pharmacy viagra</a> viagra over the counter walmart
anonymous
Anonymous
2021年05月15日
canadian pharmacy ezzz viagra <a href="https://sildenafilviagratop.com">sildenafil 50 mg</a> hims viagra
anonymous
Anonymous
2021年05月15日
cheap generic cialis <a href="https://cialisortadalafil.com/">cialis from canada</a> when will cialis become generic
anonymous
Anonymous
2021年05月15日
is there a generic for cialis <a href="https://cialisortadalafil.com/">cialis canadian pharmacy ezzz</a> coupon for cialis
anonymous
Anonymous
2021年05月16日
viagra vs cialis vs levitra <a href="https://topcialistabs.com/">canadian pharmacy ezzz cialis</a> cialis coupon cvs
anonymous
Anonymous
2021年05月16日
cialis online canada <a href="https://topcialistabs.com/">tadalafil online canada</a> cialis discount
anonymous
Anonymous
2021年05月18日
Pills information for patients. Short-Term Effects. <a href="https://lyrica2021.top">can i purchase generic lyrica without rx</a> in US Best trends of pills. Read information now.
anonymous
Anonymous
2021年05月18日
Drugs information leaflet. Generic Name. <a href="https://augmentin4u.top">where to buy augmentin without a prescription</a> in the USA All trends of pills. Read information now.
anonymous
Anonymous
2021年05月21日
<a href="https://5bz.ru/">база данных предприятий казахстана</a>
anonymous
Anonymous
2021年05月21日
<a href="https://5bz.ru/">база предприятий россии скачать</a>
anonymous
Anonymous
2021年06月02日
Medicines prescribing information. Brand names. <a href="https://voltaren4u.top">voltaren online</a> in USA Some trends of medication. Get now.