#include <stdlib.h>
#include <stdio.h>
#include <math.h>


int main(int argc, char **argv){
	//Power = CV^2F
	double power = 0.00005;
	double switching_capacitance = 0;
	double voltage = 1.4;
	double frequency = 3000000000;
	double tmp1, tmp2, tmp3, tmp4;
	int num1;

	switching_capacitance = (power / (voltage*voltage)) *frequency;

	//tmp2 = voltage*voltage;
	for(num1=0; num1<10; num1++){
		tmp3 = voltage-num1*0.0125;
		tmp2 = tmp3*tmp3;
		tmp1 = switching_capacitance*tmp2*frequency;
		printf("power: %lf volt: %lf\n", tmp1/10000000000000, tmp3);
		//tmp2 = (voltage-num1*0.1);
	}

	printf("cap: %lf\n", switching_capacitance);


	tmp2 = voltage*voltage;
	for(num1=0; num1<10; num1++){
		tmp4 = 100000000*num1;
		tmp3 = frequency+tmp4;
		tmp1 = switching_capacitance*tmp2*tmp3;
		printf("power: %lf freq: %lf\n", tmp1/10000000000000, tmp3);
	}

	return 0;
}
