#include <stdio.h>
int main(void) {
const PI = 3.14;
float round;
printf("반지름입력:");
scanf_s("%f", round,1);
printf("%f * %f * PI = %f", round, round, round*round*PI);
}
#include <stdio.h>
int main(void) {
const double PI = 3.14;
double round = 5;
printf ("%f * %f * PI = %f", round, round, round*round*PI);
return 0;
}
printf ("%f * %f * PI = %f", &round, &round, &round*round*PI);
printf일땐 &안씀. scanf 일때 & 쓰는거 ..
'C++ > c++수업' 카테고리의 다른 글
char string (0) | 2020.10.13 |
---|---|
cout cin (0) | 2020.10.13 |
<iostream> cout << (0) | 2020.10.13 |
volatile , type qualifiers(한정자) (0) | 2020.09.03 |
p197 class 계산기 (0) | 2020.08.18 |