Long time no see
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
double a[8], b[8], sum = 0.0;
|
||||
for (int i = 0; i < 8; ++i){
|
||||
printf("num %d: ",i);
|
||||
scanf("%lf", &a[i]);
|
||||
sum += a[i];
|
||||
b[i] = sum;
|
||||
}
|
||||
for (int i = 0; i < 8; ++i)
|
||||
printf("%.3lf ", a[i]);
|
||||
printf("\n");
|
||||
for (int i = 0; i < 8; ++i)
|
||||
printf("%.3lf ", b[i]);
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user