Initial commit with cleaned history

This commit is contained in:
2024-09-01 18:09:25 +02:00
commit 208004e9d0
273 changed files with 234697 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
// Averages three numbers using an array and a loop
#include <cs50.h>
#include <stdio.h>
int main(void)
{
// Get scores
int scores[3];
for (int i = 0; i < 3; i++)
{
scores[i] = get_int("Score: ");
}
// Print average
printf("Average: %f\n", (scores[0] + scores[1] + scores[2]) / 3.0);
}