C#

サンプルコード

using System;/*インターフェイスの定義*/interface IParentInterface{ void ParentInterfaceMethod();}interface ITestInter ...

C++

サンプルコード

#include <stdio.h>#include <stdlib.h>int main(){ enum color { red=1, green, blue }; enum color ...

C++

サンプルコード

#include<stdio.h> enum DAY{ MON=1, TUE, WED, THU, FRI, SAT, SUN} day;int main(){//列挙型の要素 for (day = ...

C++

サンプルコード

#include<stdio.h> enum DAY{ MON=1, TUE, WED, THU, FRI, SAT, SUN}; int main(){ enum DAY day; day = WE ...

C++

サンプルコード

#include <stdio.h>int main(){ char c; printf("文字列を入力してください: ");//文字列の入力 scanf("%c", &c); printf( ...

C#

サンプルコード

using System;namespace CalculatorApplication{ class NumberManipulator {/*関数の定義*/public int MaxVal(int num1 ...

C++

サンプルコード

#include <stdio.h> int main(void){/* 変数の宣言 */int i;/* 繰り返し処理 */for(i=0;i<21;++i) { printf("値: %d\ ...

PHP

サンプルコード

<?php$tt = getdate();echo "年:".$tt."<br/>\n";echo "月:".$tt."<br/>\n";echo "日:".$tt."<br/ ...

PHP

サンプルコード

<?php$kk = array("java", "php", "c++", "python","jquery"));echo count($kk) . "\n";?>

結果
5 ...

C++

サンプルコード

#include <stdio.h>#include <locale.h>int main(void){ char* tt = setlocale( LC_ALL, NULL ); put ...

C++

サンプルコード

#include <stdio.h>#include <math.h>#define PI 3.14159265int main (){ double x, ret, cft; x = 0 ...

C++

サンプルコード

#include <locale.h>#include <stdio.h>#include <time.h> int main (){ time_t currtime; str ...

PHP

サンプルコード

<?php//ファイルを開く$fp = fopen("demo.txt", "w");//ファイルへ書き込みfwrite($fp, "test data1*\n");fwrite($fp, "test da ...

C++

サンプルコード

#include <stdio.h>#include <limits.h>int main(){ printf("The number of bits in a byte %d\n", C ...

C++

サンプルコード

#include <stdio.h> int main(){ int sum = 17, count = 5; double tt; tt = (double) sum/count; printf(" ...

C++

サンプルコード

int main(void) { int i; int a = {13, 14, 15,16,17};/* 配列の要素を出力 */for(i=0;i<5;++i){ printf("%d\n", a); } ...

C++

サンプルコード
#include <stdio.h>

int main(void) {

int i, j;

int a = {106, 107, 108, 109};

C++

サンプルコード
#include <stdio.h>

int main ()
{
int n;
int i,j;

/* 初期化*/
for ( i = 0; ...