1
0
Fork 0

Add files via upload

This commit is contained in:
MGislv 2020-12-13 22:51:41 +01:00 committed by GitHub
parent 17c280dc34
commit c1cd913cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

19
stuff/10n-sum.c Normal file
View File

@ -0,0 +1,19 @@
/*
* Input 10 numbers and output the sum
*/
#include <stdio.h>
int main()
{
float a, sum = 0;
printf("Input 10 numbers\n");
for (int i = 0; i < 10; i++) {
scanf("%f", &a);
sum += a;
}
printf("%f\n", sum);
}