Created
November 25, 2013 07:14
-
-
Save dd1994/7637476 to your computer and use it in GitHub Desktop.
物理实验报告“霍尔效应”的一道麻烦算数题 -std=c99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
double f(double); | |
int main(int argc, char const *argv[]) | |
{ | |
double u[17] = {4.115, 5.88, 6.79, 7.2275, 7.745, 7.83, 7.8425, 7.9025, 7.8925, 7.8525, 7.84, 7.8225, 7.455, 7.165, 6.6, 5.39, 3.5115}; | |
for (int i = 0; i < 17; ++i) | |
{ | |
printf("%.3f\n",f(u[i]) ); | |
} | |
return 0; | |
} | |
double f(double u) | |
{ | |
double i = 4.00; | |
double k =18.5; | |
double b; | |
b = u/(k*i); | |
return b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment