検索結果 2 件

by ZORO
9年前
フォーラム: C言語何でも質問掲示板
トピック: 配列の入れ替え方
返信数: 7
閲覧数: 4716

Re: 配列の入れ替え方

#include<stdio.h> #define SIZE 6 void irekae(int s[], int max); int main(void) { int array[SIZE] = {1, 2, 3, 4, 5, 6}; int i; printf("Array before arranged:"); for(i = 0; i < SIZE; i++) printf("%2d", array[i]); putchar('\n'); irekae(array,SIZE); printf("Array after arranged: "); for(i = 0; i < SIZE...
by ZORO
9年前
フォーラム: C言語何でも質問掲示板
トピック: 至急おねがいします。
返信数: 2
閲覧数: 1664

Re: 至急おねがいします。

#include<stdio.h> #include<string.h> struct student{ char name[20]; int math; int eng; }; typedef struct student Srec; int main() { Srec st_a={"Kosuke",50,50}; Srec st_b; strcpy(st_b.name,"Kosuke"); st_b.math=60; st_b.eng=60; printf("名前:%s 数学:%d 英語:%d\n",st_b.name,st_b.math,st_b.eng); return 0; }

詳細検索ページへ移動する