MISW.github.io

1.

#include<stdio.h>

void ThreeNumPlus(int a,int b,int c){
	
	printf("%d + %d + %d = %d\n",a,b,c,a+b+c);
	
}

int main(){
	
	ThreeNumPlus(10,20,30);
	
	return 0;
}

2.

#include<stdio.h>

double SquareSpace(double a,double b){
	
	return a * b ;
	
}

int main(){
	
	double ans;
	
	ans = SquareSpace(20,20);
	
	printf("四角形の面積は %f\n",ans);
	
	return 0;
}

3.
#include<stdio.h>

double function(double x){
	
	return x*x*x-3*x*x;
	
}

int main(){
	
	double ans = function(4.0);
	
	printf("ans = %f",ans);
	
	return 0;
}