• 検索結果がありません。

#include <stdio.h>#include <stdio.h>int main()int main(){{ /* /*

N/A
N/A
Protected

Academic year: 2021

シェア "#include <stdio.h>#include <stdio.h>int main()int main(){{ /* /*"

Copied!
5
0
0

読み込み中.... (全文を見る)

全文

(1)

#include <stdio.h>

#include <stdio.h>

int main() int main() { {

/*

/*

表示をする 表示をする

*/ */

printf("Yes My Master\n");

printf("Yes My Master\n");

printf("May I help you\n");

printf("May I help you\n");

return(0);

return(0);

} }

Yes My Master Yes My Master

May I help you

May I help you

(2)

#include <stdio.h>

#include <stdio.h>

int main() int main() { {

/* printf

/* printf

のさまざまな使い方のさまざまな使い方

*/ */

printf("10/3=%d\n",10/3);

printf("10/3=%d\n",10/3);

printf("10/3=%f\n",10.0/3.0);

printf("10/3=%f\n",10.0/3.0);

printf("10/3=%lf\n",10.0/3.0);

printf("10/3=%lf\n",10.0/3.0);

printf("7+1=%3d\n",7+1);

printf("7+1=%3d\n",7+1);

printf("7*9=%3d\n",7*9);

printf("7*9=%3d\n",7*9);

printf("7+1=%.3f\n",7.0+3.0);

printf("7+1=%.3f\n",7.0+3.0);

return(0);

return(0);

} }

10/3=3

10/3=3.33333 10/3=3.33333 7+1= 8

7*9= 63

7/3=2.333

(3)

#include <stdio.h>

#include <stdio.h>

int main() int main() { {

/* 10000

/* 10000

円での釣銭表示 円での釣銭表示

*/ */

printf("10000: %d\n", 10000-(12*9+15*7)*1.05);

printf("10000: %d\n", 10000-(12*9+15*7)*1.05);

/* 5000

/* 5000

円での釣銭表示 円での釣銭表示

*/ */

printf("5000 : %d\n", 5000-(12*9+15*7)*1.05);

printf("5000 : %d\n", 5000-(12*9+15*7)*1.05);

/* 1000

/* 1000

円での釣銭表示 円での釣銭表示

*/ */

printf("1000 : %d\n", 1000-(12*9+15*7)*1.05);

printf("1000 : %d\n", 1000-(12*9+15*7)*1.05);

return(0);

return(0);

} }

10000: 1086527532

5000 : 1085450329

1000 : 1082671820

(4)

#include <stdio.h>

#include <stdio.h>

int main() int main() {{

/*

/* 変数を用意変数を用意 */*/

int total;

int total;

total = (12*9+15*7)*1.05;

total = (12*9+15*7)*1.05;

/* 10000

/* 10000 円での釣銭表示円での釣銭表示 */*/

printf("10000: %d\n", 10000-total);

printf("10000: %d\n", 10000-total);

/* 5000

/* 5000 円での釣銭表示円での釣銭表示 */*/

printf("5000 : %d\n", 5000-total);

printf("5000 : %d\n", 5000-total);

/* 1000

/* 1000 円での釣銭表示円での釣銭表示 */*/

printf("1000 : %d\n", 1000-total);

printf("1000 : %d\n", 1000-total);

return(0);

return(0);

}}

10000: 9777 5000 : 4777 1000 : 777

(5)

#include <stdio.h>

#include <stdio.h>

int main() int main() {{

/*

/* 様々な変数の型 様々な変数の型 */*/

int num;

int num;

long int l_num;

long int l_num;

float f_num;

float f_num;

double d_num;

double d_num;

num = -1-2; /*

num = -1-2; /* 整数値整数値 */*/

l_num = 8000000; /*

l_num = 8000000; /* より大きな値の整数値を入れられるより大きな値の整数値を入れられる */*/

f_num = 1.234; /*

f_num = 1.234; /* 実数値実数値 */*/

d_num = 1.23456; /*

d_num = 1.23456; /* より精度の高い実数値を入れられるより精度の高い実数値を入れられる */*/

printf("%d\n", num); /* int

printf("%d\n", num); /* int 型の表示には型の表示には %d%d を指定を指定 ** //

printf("%ld\n", l_num); /* int

printf("%ld\n", l_num); /* int 型の表示には型の表示には %d%d を指定を指定 ** //

printf("%f\n", f_num); /* int

printf("%f\n", f_num); /* int 型の表示には型の表示には %d%d を指定を指定 ** //

printf("%lf\n", d_num); /* int

printf("%lf\n", d_num); /* int 型の表示には型の表示には %d%d を指定を指定 ** //

return(0);

return(0);

}}

-3

8000000 1.234000 1.234560

参照

関連したドキュメント

Various attempts have been made to give an upper bound for the solutions of the delayed version of the Gronwall–Bellman integral inequality, but the obtained estimations are not

For example, a maximal embedded collection of tori in an irreducible manifold is complete as each of the component manifolds is indecomposable (any additional surface would have to

Its Tamari polynomial B T (x) counts the trees smaller than or equal to T in the Tamari order according to the number of nodes on their

のようにすべきだと考えていますか。 やっと開通します。長野、太田地区方面  

Although the choice of the state spaces is free in principle, some restrictions appear in Riemann geometry: Because Einstein‘s field equations contain the second derivatives of the

[r]

In this article we prove a classification theorem (Main theorem) of real planar cubic vector fields which possess two distinct infinite singularities (real or complex) and

Since the Shimura series has an integral presentation as a Rankin-Selberg con- volution of Siegel’s theta series and a Hilbert modular form, we recall here the definition and