The meaning and significance of week and week 0 in this sentence

Updated on educate 2024-05-24
5 answers
  1. Anonymous users2024-02-11

    From the point of view of the program, the variable week represents Monday to Sunday (Sunday is represented by 2, Monday is represented by 2, and so on, that is, week represents the day of the week), the role of the program is to print out the monthly calendar, I directly add comments in the program.

    for(int i=1;i<=monthdays;i++)"\t");Enter the current day i and enter one"\t"

    After output, week is added by 1 to indicate that today is the day of the week.

    week++;

    Print the calendar, Saturday to change the line, week==7 to determine whether it is Saturday. if(week==7){

    );Determines whether the current date is Saturday and, if so, outputs line breaks.

    If it's a Saturday (last day), set week to 0

    week=0;

    Without week++, the value of week will always stop at the initial value (look at the initial value given by you outside), that is, it will never be able to wrap.

    No week = 0 week to 7 will continue to increase, there are no more than 8 days in a week.

  2. Anonymous users2024-02-10

    Hehe, I guess that means to cycle the number of days in a month and print it as follows:

    If you remove week++ and week=0, it becomes like this:

  3. Anonymous users2024-02-09

    week++ does not exist when the cycle is looped, and the week will not be added once per cycle.

    week=0 There are only seven days in a week, and if it doesn't exist, the week will be added all the time, eight weeks and nine ......

  4. Anonymous users2024-02-08

    It means that you want to output the number of days without a month by week, the function of week is to change the line every week of output, if there is no week, then all dates will be output in one line (of course, the display will still be new) like the following.

  5. Anonymous users2024-02-07

    Your question is simple. Hehe. Know that it would be a pleasure to help you with the issues you raised.

    Original sentence: week

    Translation: nWeek, week.

    Knowledge fills: ly week Holy Week; Good Friday; the week before Easter; Great Sunday.

    Passion Week: The first week before Easter; Good Friday; the second week before the Day of Resurrection; Take the week of the crucifixion.

    fashion week; Fashion Week; fashion shows; New York Fashion Week.

    week four; Humanities and Geography Current Reading; exotic; Characters and stories to read in context.

    Week One News & Current Affairs Reading; Week 1; Table of Contents] Volume 1 Digging Week; A colorful life.

    silver week**; Silver Week.

    every week; The nuclear period of each star state; Performed once a week.

    Industry Week; Industry Weekly; Industry Weekly; Business Week.

    Know to always give you the most professional English translation.

Related questions
9 answers2024-05-24

It's a broken sleeve. 1 is to attack, 0 is to receive,

4 answers2024-05-24

The post-80s generation is the post-00s parents.

4 answers2024-05-24

RAID 0: Error-free controlled bands.

To achieve RAID0 there must be more than two hard drives, RAID0 implements bands, and the data is not stored on one hard disk, but is divided into data blocks and stored on different drives. Because the data is distributed across different drives, the data throughput rate is greatly improved, and the load on the drives is more balanced. If you just need the data to be efficient on different drives. >>>More

14 answers2024-05-24

The performance of two 500G SATA3 interface hard disk groups RAID0 is not as good as that of SSDs, and the slightly better array cards cost more than 1,000 yuan. >>>More

5 answers2024-05-24

It's my first time watching a Gundam anime, so there's no way to compare it to the previous ones, but this anime is one of the best in terms of graphics. In terms of content, it is still relatively attractive. The characters are very beautiful, especially the protagonist is very handsome. >>>More