#include <stdio.h>
int main() {
int year = 12, value = 10, total = 0;
do {
year++;
value *= 2;
total += value;
} while (value < 1000);
printf("Age: %d", year);
printf("\nLast gift: %d", value);
printf("\nTotal: %d",total);
return 0;
}
Comments
Leave a comment