HI guys i need to design a soduko puzzle this time
if my input is like this:
..5......
3...7..9.
29..41...
.7681.2.3
.2...4.1.
1.4.6795.
...4...27
Type: Posts; User: bobbie18
HI guys i need to design a soduko puzzle this time
if my input is like this:
..5......
3...7..9.
29..41...
.7681.2.3
.2...4.1.
1.4.6795.
...4...27
thx for th reply todd but i dunno y it still doesnt work... if i enter a year but no month like XXXX -
(- means nothing) program wont appear normal until i enter something
the output of program...
thx for the reply mats
but i think this fgets and buffer is way too complicated for this program (we are only allowed to use what we learn)
are there any other simpler methods?
hi all
right now i got this code
if (scanf("%d %d", &year, &month)!=2) {
printf("Input error\n");
}
it sort of behaves how i wanted it to like when i didnt enter 2 integers will pop out...
i just learned really basic stuff
so wahtz a strtol() and end pointer?
i dont know how to start tho
heya all
i have absolute no idea how to put an input error code in my program
im required to print a input error statement if two integers were not entered
this input error code need to work if ...
thx a lot for the replies guys
........ internet from down under...
didnt c the answers until now
but so far my format is like this
{
if ((year/1000)==3)
{ printf("thirty");}
if ((year/1000)==4)
{printf("forty");}
thx for the reply
...apparently we can only use a lot of if statements so i think we aren't allow to use character array
so so far im stuck on how to do a year like 1782 using only IF and IF else...
thx for the reply
can u show me an if statement for the yr 1782 for eg
which would convert to seventeen hundred and eighty two?
but i break it into hundreds it might be convienet for years from 1700-1900
but let say 8999 it will be hard doing hundreds
so let say 1782
wouldn't it be
seventeen hundred eighty two
but then i cant seperate 17 from the 1782 with the normal method....
but they want it in this format:
Enter year and month: 1980 2
nineteen hundred eighty
has three hundred and sixty six (366) days
February has 29 days
% ./assn1
Enter year and month: 1980 3...
but let say 1782
how does the divison work on that?
1782/1000 and then ???
lol im so confused
PLEASE do you mind giving me an example
PLEASE literally begging you
and i dont know why the output is
fortythree hundrendone
i cant get the twenty out for some reasons???
i c i c thx for the reply
can you give me some ideas of how to write the year 1782 for eg?
cause wont i have to create a eleven to nineteen dictionary for the program?
any samples?
i got the following but i do not know why it doesn't work
{
if ((year/1000)=4)
{
printf("forty");
}
if (((year%1000)/10)=3)
{
elysia thx for ur reply...but i think this too compilcated. we are only allowed to use if and else if statements... is there any chance u can make this simpler?
a sample of the code....
i got this so far
if (year/1000)=4
printf("forty")
if ((year%1000)/10)=3
printf("three hundrend")
if ((year%1000)/100)=2
...
my teacher forced us to make a program from the stuff we learn such as if statements. so i think i have to create at least 49 if statements but can someone plz show me an example plesase. BEgging you...
can someone please demonstrate a code of how to do it for years 4321 for eg. and also i have ABSOLUTE no idea on how to do years such 1700 to 1999. can someone show me a code. Im not getting u guys...
hi guys im back
i just realised for the coverting years into words bit like eg:
2008 ----> twenty hundred and eight
How do i do it if i am only allowed using the if method?
so far i got
year...
thx for the sample mat
can someone explain what is
fflush(stdout);?
and
char *numbers[] ?
haha i just need a header in case my teacher saw this thread and said i plagiaries