anonymous No title
No License C++
2020年09月11日
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の乱数--
	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の乱数--
	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月19日
Pills information sheet. What side effects? <a href="https://lyricafor.top">can i order generic pregabalin without prescription</a> in Canada Some about medicine. Read information here.
anonymous
Anonymous
2021年04月26日
Drug information leaflet. Cautions. <a href="https://lyricafor.top">can i purchase cheap pregabalin for sale</a> in USA All what you want to know about medicine. Get now.
anonymous
Anonymous
2021年04月30日
cialis price walmart <a href="https://mycialistabs.com/">tadalafil citrate liquid</a> do you need a prescription for cialis in canada
anonymous
Anonymous
2021年04月30日
buy cialis online reddit <a href="https://mycialistabs.com/">how much cialis to take</a> cialis 5mg price
anonymous
Anonymous
2021年05月03日
cialis without prescription <a href="https://toptadalafiltabs.com/">generic cialis</a> cialis drug
anonymous
Anonymous
2021年05月04日
cialis back pain <a href="https://toptadalafiltabs.com/">cialis vs.levitra</a> buy generic cialis online
anonymous
Anonymous
2021年05月05日
how do you write a persuasive essay <a href="https://topessaywriterfas.com/">writing essays online</a> how to write an essay about yourself for scholarships
anonymous
Anonymous
2021年05月06日
how to write a nonfiction essay <a href="https://topessaywriterfas.com/">easy way to write an essay</a> which statement below describes the best time to write a title for an essay?
anonymous
Anonymous
2021年05月07日
abortion essay writing service <a href="http://writemyessayslfd.com/">essay writing service cheap</a> what to write an essay about
anonymous
Anonymous
2021年05月07日
law school admission essay service uk <a href="http://writemyessayslfd.com/">writing an argumentative essay</a> essay writing service australia reddit
anonymous
Anonymous
2021年05月07日
viagra woman <a href="https://mrviagrashop.com">generic viagra prices</a> viagra canadian pharmacy ezzz
anonymous
Anonymous
2021年05月07日
viagra from india <a href="https://mrviagrashop.com">where to buy viagra</a> itsoktocry viagra
anonymous
Anonymous
2021年05月08日
sildenafil over the counter cvs <a href="https://mysildenafilkr.com/">sildenafil citrate 100mg tab</a> viagra buy
anonymous
Anonymous
2021年05月08日
buy real viagra online <a href="https://mysildenafilkr.com/">viagra connect</a> women viagra pills
anonymous
Anonymous
2021年05月12日
resume services near me <a href="http://coverletterforresumetop.com/">resume writers reviews</a> video editor resume
anonymous
Anonymous
2021年05月12日
coupons for cialis <a href="http://tadalafilled.com/">levitra vs cialis</a> cialis mexico
anonymous
Anonymous
2021年05月12日
resume for teens <a href="http://coverletterforresumetop.com/">need help writing a resume</a> project coordinator resume
anonymous
Anonymous
2021年05月13日
communication skills resume <a href="https://writingacoverletteronline.com/">build my resume</a> theatre resume
anonymous
Anonymous
2021年05月13日
teva generic cialis <a href="http://tadalafilled.com/">tadalafil 10mg</a> cialis active ingredient
anonymous
Anonymous
2021年05月13日
social work resume <a href="https://writingacoverletteronline.com/">best resume creator</a> computer skills on resume
anonymous
Anonymous
2021年05月14日
viagra online without prescription <a href="https://edviagramaster.net/">over the counter viagra substitute walmart</a> viagra
anonymous
Anonymous
2021年05月14日
viagra canadian pharmacy ezzz <a href="https://edviagramaster.net/">edviagramaster.net</a> sildenafil 20mg
anonymous
Anonymous
2021年05月16日
online viagra prescription <a href="https://sildenafilviagratop.com">sildenafil nitrate</a> over the counter viagra walmart
anonymous
Anonymous
2021年05月16日
generic name for cialis <a href="https://cialisortadalafil.com/">cialis coupon</a> cialis 20 mg price
anonymous
Anonymous
2021年05月16日
cialis dosages <a href="https://cialisortadalafil.com/">canadian pharmacy cialis</a> canadian pharmacy online cialis
anonymous
Anonymous
2021年05月16日
over the counter viagra <a href="https://sildenafilviagratop.com">sildenafil citrate</a> online viagra
anonymous
Anonymous
2021年05月17日
cialis 20 mg <a href="https://topcialistabs.com/">when will cialis become generic</a> cialis price per pill
anonymous
Anonymous
2021年05月17日
cialis side effect <a href="https://topcialistabs.com/">viagra cialis levitra</a> cialis instructions
anonymous
Anonymous
2021年07月19日
<a href="https://krasota4u.ru">where to get generic trazodone</a>
anonymous
Anonymous
2021年07月25日
Meds information for patients. Drug Class. <a href="https://plaquenil4people.top">can you buy plaquenil without prescription</a> in Canada Best about medicines. Read information now.