2020年6月17日 星期三

C語言筆記6-函式1090617

1、#include<stdio.h>


2、#include<math.h>
      float num1;
      num1=pow(2,3)   //2的3次方
   


3、#include<string.h>
   int length;
   char stra[100]="\0"
   scanf("%s",&stra);
   length=strlen(stra);   計算輸入字串的長度
    strncat(st1,strb,10)  輸入的strb串接到st1的後面,最多10個字元




4、#include<time.h>
     srand(time(NULL))   取時間作為亂數組

  srand(time(0) )  取時間作為亂數組

    randabc1=rand()

沒有留言:

張貼留言

Chrome教學5-建立桌面捷徑1110217

 建立桌面捷徑