2020年2月4日 星期二
sizeof(type)
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int a,b;
scanf( "%d %d", &a, &b );
printf( "MAX -> %d \n" , (a>b?a:b) );
printf( "sizeof(a)=%d, sizeof(int) =%d, sizeof(float)=%d \n sizeof(double)=%d \n" ,\
sizeof(a),sizeof(int), sizeof(float), sizeof(double) );
//印出a的大小 印出int大小
//程式碼太長換行加\
system( "PAUSE" );
return 0;
}
訂閱:
張貼留言 (Atom)
algorithm
#include <iostream> #include <string.h> using namespace std; int main(int argc, char** argv) { for(int j=2;j<=100;j++)//j...

沒有留言:
張貼留言