Study day 9

Time:2022-5-3

C language

  1. Nested Loop

    1. A loop body contains another loop statement

    2. 99 multiplication table of for statement

    3. int a, b, c;
      	  for (a=1;a<=9; a++)
      	  {
      		  for (b = 1 ; b <= a ; b++)
      		  {
      			  c = a * b;
      			  printf("%d*%d=%d   "     , a,  b,  c);
      		  }
      		  printf("\n" );
      	  }
  2. Comparison of circular statements

    1. While and for judge first, then execute
      2. Do while
      3. While, do while and for can be usedBreak out of loopUse continue to end this cycle
  3. Break and continue statements

    1. break

      1. Break statements cannot be used in places other than loop statements and switch statements

        1. Break is used in switch to jump out of the switch loop instead of the loop
          3. Break. You can only jump out of theThis layer of circulation

          1. continue

            1. Continue can only be used in while, do while and for
        int a;
        for ( a = 1; a <=100; a++)
        {
        	If (a% 6 = = 0) // can be divided by six
        	continue;
        	printf("%d   ", a);
        }

Recommended Today

Big data Hadoop — spark SQL + spark streaming

catalogue 1、 Spark SQL overview 2、 Sparksql version 1) Evolution of sparksql 2) Comparison between shark and sparksql 3)SparkSession 3、 RDD, dataframes and dataset 1) Relationship between the three 1)RDD 1. Core concept 2. RDD simple operation 3、RDD API 1)Transformation 2)Action 4. Actual operation 2)DataFrames 1. DSL style syntax operation 1) Dataframe creation 2. SQL […]