|
printf(\"sum =
}
void subprog3(data, n) /* 배열 크기의 정보를 인수로 넘겨줌 */
int data[], n;
{
int sum = 0, I;
for (I=0; I<n; ++I)
sum += data[I];
printf(\"sum =
}
3.4 문자열의 인수 전달
C 언어에서의 문자열은 char 형의 1차원 배열로 표현하기 때문에 1차원 배열의
|
- 페이지 12페이지
- 가격 3,500원
- 등록일 2008.01.06
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
printf(\"number = %d\\n\\n\", number);
return 0;
}
void incrementbyvalue(int number){
number++;
}
void incrementbyreference(int *number){
(*number)++;
}
결과
예제4=====================================================
#include <stdio.h>
void main(void)
{
int i = 0;
char c1[] = {\'c\', \' \', \'
|
- 페이지 16페이지
- 가격 2,000원
- 등록일 2007.01.29
- 파일종류 한글(hwp)
- 참고문헌 있음
- 최근 2주 판매 이력 없음
|
|
c)opper\");
puts(\"(a)luminum\");
puts(\"(s)ilver\");
puts(\"(m)aganese\");
/* get conductor type*/
ch=getchar();
printf(\"Enter radius and length of conductor >>\");
scanf(\"%f %f\",&radius,&length);
/* area of conductor*/
area=PI*(radius*radius); /* convert to lowercase and determine resisti
|
- 페이지 12페이지
- 가격 2,000원
- 등록일 2006.04.17
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
C를 for문을 사용해서 고쳐 봅시다.
[ 예제 5-9.C ]
#include <stdio.h>
main()
{
int a, sum=0;
for (a=1; a<=5; ++a)
sum = sum + a;
printf(\"sum =
}
[문제1] 12
,
22
,
32
, ......., 102
의 값을 순서대로 표시하는 프로그램을 작성하시오.
[문제2] 210
을 구하는 프로그
|
- 페이지 19페이지
- 가격 4,000원
- 등록일 2008.01.06
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
우측편으로가서 동일과정을 수행
}
int myPower(int a, int b) //a의b 제곱을 구하기 위한 함수.. pow()를 써도됨
{
int c = 1;
while(b--)
c *= a;
return c;
}
void printBinTree(int *a, int n) // 이진탐색트리를 표준출력
{
int i, j;
for(i = 0, j = 1; i < n; i++)
{
printf(\"%d \", a[i])
|
- 페이지 3페이지
- 가격 4,000원
- 등록일 2012.08.31
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
printf(\"Please, input two number!\n\");
scanf(%d %d\", $a, %b);
if(a>b)
printf(\"%d\",a);
if(a<=b)
printf(\"%d\n\",b);
return 0;
}
○ if 문을 사용한 C 의 프로그램.
⇒ 실행 결과
Please, input number!
10 20
20
7. 반복문
1) while 문
: 임의의 횟수의 일정 구간을 반복 처리하
|
- 페이지 14페이지
- 가격 2,300원
- 등록일 2003.06.06
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
C\'
\'D\'
\'\\0\'
\'E\'
\'F\'
\'G\'
\'H\'
\'\\0\'
[ 연습 1 ]
#include <stdio.h>
int tbl[4][3] = {{1,2}, {3,4}, {4,5}};
main()
{
int I ;
for(I=0; i<4; I++)
tbl[I][2] = tbl[I][0] + tnl[I][1];
for(I=0; I<3; I++0
tbl[3][I] = tbl[0][I] + tbl [1][I] + tbl[2][I];
for(I=0; I<4; I++)
printf(\"
|
- 페이지 14페이지
- 가격 3,500원
- 등록일 2010.02.22
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
C]
#include <stdio.h>
main()
{
static unsigned short a[4] = {0x1234, 0x5678, 0x9abc, 0xdef0)
unsigned char *p1;
unsigned int *p2;
ungigned long *p3;
(unsigned short *)p1= (unsigned short *)p2= (unsigned short *)p3=a;
printf(\"연산전 p1=%x, *p1=
p1=p1+3;
printf(\"연산후 p1=%x, *p1=
printf(\"연
|
- 페이지 11페이지
- 가격 3,500원
- 등록일 2008.01.06
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
c\"-File
Scanning 수행 결과
testinput.c
1: #include<stdio.h>
2:
3: int main(void){
4: int i;
5: int int_value = 3;
6: float float_value = 4.0;
7: double double_value = 5.0;
8:
9: for(i=0; i< 30; ++i){
10: printf(\"This is String\\n\");
11: }
12:
13: if( i <= 3 ){
14: if(int_value == 4)
|
- 페이지 35페이지
- 가격 3,000원
- 등록일 2010.10.15
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
C로 구현한 수치해석,이현일저,
선형회귀분석
#include <stdio.h>
#include <math.h>
double sumX = 0.0, sumXY= 0.0;
double sumY = 0.0, sumXsquare = 0.0;
double xValue[21], yValue[21], xAverage, yAverage, a1,a0;
int i, numberDatepoints;
void main()
{
printf(\"\\n <1> The number of date
|
- 페이지 7페이지
- 가격 1,500원
- 등록일 2005.12.18
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|