diff options
Diffstat (limited to 'problems/rubyshousehunt/attachments/template.c')
-rw-r--r-- | problems/rubyshousehunt/attachments/template.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/problems/rubyshousehunt/attachments/template.c b/problems/rubyshousehunt/attachments/template.c new file mode 100644 index 0000000..ac44136 --- /dev/null +++ b/problems/rubyshousehunt/attachments/template.c @@ -0,0 +1,26 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdbool.h> + +int main() +{ + int income; + float mr; + int savings; + scanf("%d%f%d", &income, &mr, &savings); + int N; + scanf("%d", &N); + for (int i = 0; i < N; i++) { + int price; + int expenses; + scanf("%d%d", &price, &expenses); + } + + // Write an answer using printf(). DON'T FORGET THE TRAILING \n + // To debug: fprintf(stderr, "Debug messages...\n"); + + printf("Yes, the house is affordable with 1 roommate(s) and $1 to spare.\n"); + + return 0; +} |