Jump to content

help please m stuck !

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
zizimetalique

zizimetalique

    Newbie

  • Members
  • PipPip
  • 20 posts
i cant seem to get my logic right please help

int day, iteration, year, date, month =, display bool leap, converted = faulse;
// cheap sleazy way to start july 14, 559;
day = 31+28+31+30+31+30+14;
iteration = 0;
year = 559;
display = 5;
cout<< "07/14/559"<< endl;
while (display! = 0){
++ iteration;
day = day+256;
if(!converted &&(year = = 1752&& day >246){
converted = true;
day = day+ 11}
}
if (leap(year)&&day>366){
day = day%366;
++ year;
}
else if(! is leap(year)&& day>365){
day = day%365;
++ year;
}
FindMonthday(

the prog i am suppose to write is

The Feast of St. Habakkuk

St. Habakkuk of the Abacus is the patron saint of software engineers. He was a public scribe and money-changer (an honest one) in the late Roman Empire, when all computation was performed on a kind of abacus consisting of pebbles (“calculi”) sliding in a grooved tabletop. He developed an improved method of multiplication, which enabled him to carry out his clients’ commissions much more quickly and efficiently than any of his competitors. His offer to teach them his system free of charge (the first recorded instance of shareware) only inflamed their rage, and they stoned him to death with the pebbles of his own counting board: he was martyred, by calculation, on July 14, A.D. 559.

His feast day is celebrated every 256 days. December 25, 1987 was the 2038th (decimal) iteration of St. Habakkuk’s Day.

Determine when the next 5 feasts of St. Habakkuk will take place. Display the feast number and date.

Frequently Asked Questions about Calendars Version 2.8 contains a lot of information on calendars, such as how leap years are determined and perpetual calendars.
any help is appreciated

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
First thing: I would start on December 25, 1987 rather than July 14, 559.
Second thing: The code you gave us isn't even valid C++ code.
Finally, what are you doing to test the results? Can you describe where the problem is? Just a quick glance suggests to me that your code doesn't produce any output (other than the start date), making it hard to tell what you think it should be doing.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
zizimetalique

zizimetalique

    Newbie

  • Members
  • PipPip
  • 20 posts
i am the weakest programmer and i know i seem to complicate my code because i have had a terrible teacher of CS115 my style is not even good i am confused i dont know how to go or continue and this is my fourth prog due soon.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
It will be difficult for us to help you without seeing the complete code you have at this point.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Victor

Victor

    Programmer

  • Members
  • PipPipPipPip
  • 116 posts
Looks like there are some misspellings in the code, False in the first line, not faulse for instance