U E D R , A S I H C RSS

수학의정석/방정식/조현태

.
.

~cpp 
#include <math.h>
#include <stdio.h>
#include <time.h>  

void input_data(int*,int*,int*);
void process(int, int, double);

const int MINUTE=60;

int main()  
{  
	int time_in;   //   .  
	/////
	int x,y,t;
	/////
	input_data(&x,&y,&t);

	time_in = clock();   //    .
	process(x,y,t);
	printf("CPU CLOCKS = %d\n", clock() - time_in);   //   -   =    
	return 0;    //  .  
}  

void input_data(int *x, int *y, int *t)
{
	printf("  >>");
	scanf("%d",x);
	printf("  >>");
	scanf("%d",y);
	printf("  >>");
	scanf("%d",t);
}

void process(int x, int y, double t)
{
	t=t/MINUTE;
	double answer=sqrt((float)(y*y+t*t*x*x));
	answer+=y;answer/=t;
	printf("%.2f",answer);
}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:30:15
Processing time 0.0087 sec