「C++」100以内の素数を求めるサンプルコード
サンプルコード
#include <iostream>
#include <cmath>
#define MAX 100
using namespace std;
i ...
「C言語開発」シェルスクリプト(losetup -f)を実行するサンプ
サンプルコード
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include < ...
C言語入門 -自然数の階乗を計算するサンプルコード
サンプルコード
#include <iostream>
using namespace std;
const int N = 40000;
void FactCal(int n) ...
C#入門–配列Arrayの使い方
C#コード
using System;namespace ArrayApplication{
class MyArray
{
static void Main(string n = new int; ...
c#入門でforeachを利用して配列の要素を操作する
参考コード
using System;
public class startnews24demo {
public static void Main() {
int sum = 0;
int; ...
C言語でk^n=pを計算するサンプルコード
参考コード:
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
doubl ...
「c/c++」学習でランダム文字列を生成するサンプルコード
下記コード:
private string GenerateCheckCode()
{
char);
chkCode += code.ToString();
}
Session = ...
C#–バイト配列を16進数へ変換するサンプルコード
代码示例
byte{3,5,6,9};
StringBuilder builder = new StringBuilder(length * 2);
foreach(byte value in todd) ...
C#全角文字列を半角文字列に変換するサンプルプログラム
C#コード:
string ZenKakuToHanKaku(string str)
{
string QJstr = str;
char b = System.Text.Encoding.Unicod ...
「C言語入門」バブルソート(単純交換ソート)のサンプルコード
参考ソースコード:
void pointArr(){
int arr);
int *pointer;
pointer = arr;
for (int i = 0; i<count-1; ...
「C言語入門」選択ソート(Selection sort)のサンプルコード
参考ソースコード:
void selectArr(){
int arr);
for (int i = 0; i<count-1; i++) {
for (int j = i+1; j<c ...
[C++]演算子で文字列を結合するサンプル
書式
文字列A +文字列B
使用例
[C++]代入演算子で文字列を結合するサンプル
書式
変数名 +=文字列
使用例
「C++」insertメソッドで文字列を追加するサンプル
書式
対象文字列.insert(位置, 追加文字列)
使用例
[C++]append()で文字列を追加するサンプル
書式
文字列A.append(文字列B)
使用例
「C++入門」replaceメソッドで指定位置の文字列を置き換えるサンプル
書式
対象文字列.replace(開始位置,長さ,置換する文字列)
使用例
Windows 7でMonoGame 3.2のインストール
1.VS 2012 Ultimate版をインストール
2.MonoGame 3.2をダウンロード
3.MonoGameをインストール
4.MonoGameプロジェクトを作成し、「Hellw
winformでWindowを閉じる処理方法
Form1.Designer.cs に下記を追加
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClos ...