Created
June 23, 2022 15:11
-
-
Save DeclanGas/23fd4a7b413c8af14df6c8c3cc9042e6 to your computer and use it in GitHub Desktop.
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 <cs50.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
int total = 0; | |
for (int i = 0; i <= 10; i++) | |
{ | |
total += i; | |
} | |
printf("The total of the numbers from 1 to 10 is: %i\n", total); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment