2023년 1월 14일 토요일

C언어 변수 출력 예제

 



#include<stdio.h>
void main(){
char a = 'A';
int b = 10;
printf("%c %d\n",a, b);
printf("%5d\n", 4);
printf("%05d\n", 4);
printf("%-5d\n" ,4);
printf("%-05d\n", 4);
}
//출력
//A 10
//. 4
//00004
//4
//4

댓글 없음:

댓글 쓰기