I don't know how to translate that into actual code for my program, plus its late so I am going to bed. Thanks for the help anyways.
Type: Posts; User: jc99
I don't know how to translate that into actual code for my program, plus its late so I am going to bed. Thanks for the help anyways.
How would that go? I did the following but it didn't work...
#include <stdio.h>
char line[10];
int year;
int leap1;
int leap2;
int leap3;
I have this and it works...
#include <stdio.h>
char line[10];
int year;
int leap1;
int leap2;
int leap3;
ok, I did...
#include <stdio.h>
char line[10];
int year;
int leap1;
int leap2;
int leap3;
Hey all,
I have the following problem...
"A leap year is any year divisible by 4, unless the year is divisible by 100 but not 400. Write a program to tell if a year is a leap year."
I can...
Maybe I am missing it but I am re-reading chp6 (on page 85) and all I can find is...
if (condition)
statement;
else
statement;
Which is "if else" I see no mention of "else if". I was...
Are you talking about
char line[4];
I am still a little confused what I need it for. I thought I needed it so I can use fgets and sscanf to get the grade I entered into the program when I run...
The book, so far, doesn't mention "else if". I am answering the question with what I have learned so far. I am aware there are probably more elegant ways of answering this question but I haven't...
OK, I have figured out the answer to question 6-2. For anyone who wants to know here it is
#include <stdio.h>
char line[4];
int grade;
Hey all :-) I am new to the forums and have decided to try and learn C.
The book I am using to teach myself C is "Practical C Programming, Third Edition" by O'Reilly.
I am on chapter 6 and am...