https://github.com/mikixit/exercise-1-c
exercise-1-c | C | ask the user to enter the numbers that will , when 0 is entered I print the result
https://github.com/mikixit/exercise-1-c
c c-exer exercise
Last synced: over 1 year ago
JSON representation
exercise-1-c | C | ask the user to enter the numbers that will , when 0 is entered I print the result
- Host: GitHub
- URL: https://github.com/mikixit/exercise-1-c
- Owner: MikixIT
- Created: 2023-10-02T15:28:38.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-02T15:41:33.000Z (almost 3 years ago)
- Last Synced: 2025-01-22T11:19:28.129Z (over 1 year ago)
- Topics: c, c-exer, exercise
- Language: C
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# exercise-1-c
exercise-1-c | C | ask the user to enter the numbers that will , when 0 is entered I print the result
```c
//
// main.c
// exercise-1-c
// ask the user to enter the numbers that will , when 0 is entered I print the result
// Created by Michael Torres on 02/10/23.
//
#include
int main(void) {
int x , numbers = 0 ;
while (x!=0) {
printf("enter a number: ");
scanf("%d", &x);
numbers+=x;
}
// if u type a letter, is a mess lol
printf("\n the sum of your typed numbers is: %d \n", numbers);
}
```