一道C语言作业 谁帮我做下啊.
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/19 18:57:47
一道C语言作业 谁帮我做下啊.
write a program that will read five values of type double from the keyboard and store them in an array.Calculate the reciprocal of each value (the reciprocal of a value x is 1.0/x)and store it in a separate array.Output the values of the recipraocals ,and calculate and output the sum of the reciprocals.
write a program that will read five values of type double from the keyboard and store them in an array.Calculate the reciprocal of each value (the reciprocal of a value x is 1.0/x)and store it in a separate array.Output the values of the recipraocals ,and calculate and output the sum of the reciprocals.
#include
void main()
{
double num[5], result[5];
double sum=0.0;
int i;
for (i=0; i
void main()
{
double num[5], result[5];
double sum=0.0;
int i;
for (i=0; i