IT 정보/C언어
[C/MFC/C언어] if문
김윤석
2007. 12. 20. 16:58
if문
형식
![]() ![]() ![]() 예제1) |

형식
![]() ![]() ![]() ![]() ![]() 예제 2) 예제 3) |

![]()
![]() ![]() ![]() ![]() 예제 4) #include<stdio.h> #include<conio.h> main(){ int a,b; char ch; printf("Do you want to :\n"); printf("Add,Subtract,Multiply,or Divide?\n"); ch=getche(); printf("\n"); printf("enter the first number : "); scanf("%d",&a); printf("enter the second number : "); scanf("%d",&b); if(ch=='A') printf("%d",a+b); ![]() ![]() ![]() ![]() } |