ページ 11

【理科総合A】水素イオンのモル濃度と液性(投稿サンプル)

Posted: 2011年3月15日(火) 10:27
by みけCAT
理科総合Aの、水素イオンのモル濃度による液性の判定です。

コード:

#include <stdio.h>

int main(void) {
	double morunoudo;
	printf("水素イオンのモル濃度[mol/l]=10^");
	scanf("%lf",&morunoudo);
	if(morunoudo<-7)printf("塩基性です\n");
	else if(morunoudo>-7)printf("酸性です\n");
	else printf("中性です\n");
	return 0;
}