added ws202425 courses

This commit is contained in:
2024-11-14 13:11:04 +01:00
parent 800282c2e8
commit beb31897b1
461 changed files with 20368 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#include <cs50.h>
#include <stdio.h>
int main()
{
// TODO: Prompt for start size
int start;
do
{
start = get_int("Start size over 9: ");
}
while (start < 9);
// TODO: Prompt for end size
int end;
do
{
end = get_int("End size: ");
}
while (end < start);
// TODO: Calculate number of years until we reach threshold
int years = 0;
while (start < end)
{
start = start + (start / 3) - (start / 4);
years++;
}
// TODO: Print number of years
printf("Years: %i\n", years);
}