https://github.com/ozzies-code/contador1
The following exercise combines the use of IF with the While loop to set the value of a counter when a variable reaches a specified value after being incremented.
https://github.com/ozzies-code/contador1
Last synced: over 1 year ago
JSON representation
The following exercise combines the use of IF with the While loop to set the value of a counter when a variable reaches a specified value after being incremented.
- Host: GitHub
- URL: https://github.com/ozzies-code/contador1
- Owner: ozzies-code
- Created: 2023-07-30T17:35:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-30T17:40:04.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T12:13:08.583Z (over 1 year ago)
- Language: C
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# contador1
The following exercise combines the use of IF with the While loop to set the value of a counter when a variable reaches a specified value after being incremented.
#include
#include
int main(int argc, char *argv[])
{
int contador = 0; /*Inicializa la condicion*/
while(contador < 5) /*condicion de prueba*/
{
contador++; /*cuerpo de bucle*/
printf(" Contador: %d \n", contador);
}
printf(" Terminado. Contador: %d \n", contador);
system("PAUSE");
return 0;
}