혼자 c언어를 배워보겠다고 책한권달랑사서 해보려니
예문이 이해가 안갑니다 간단하게 4개 정도 뽑아서 왔는데요..
아시는분 있으시면 주석점 달아주세요.. 주석달려진거보면 쉽게 이해할수있을거 같습니다
#include <stdio.h>
void main(void)
{
float grade1; /* declare grade1 as a float variable */
float grade2; /* declare grade2 as a gloat variable */
float total; /* declare total as a gloat variable */
float average; /* dealare average as a gloat variable */
grade1 = 85.5;
grade2 = 97.0;
total = grade1 + grade2;
average = total/2.0;
printf("The average grade is %f\n",average);
}
#include <stdio.h>
void main (void)
{
int mun1;
printf("bytes of storage used by an integer: %d/n", sizeof(num1));
}
#include <stdio.h>
void main (void)
{
float radius, circumference;
radius = 2.0;
circumference = 2.0 * 3.1414 * radius;
printf("The circumference of the circle is %f\n", circumference)'
}
#include <stdio.h>
void main (void)
{
float time, length, pi;
pi = 3,1416
time = 1.0;
length = 12.0 * 32.2 * time/(2.0*pi) * time/(2.0*pi);
prientf("The iength is %4.2f inches. \n", length);
}
정말 감솨여
|