박지민 20180407 과제
페이지 정보
작성자 박지민 작성일18-04-12 20:33 조회21회 댓글0건본문
숙제1: 이름출력하기
숙제2: 각자리수의 합 구하기 소스:
#include <stdio.h>
void main(void)
{
int num;
printf("세자리수 입력: ");
scanf("%d" ,&num);
printf("각 자리 수의 합: %d \n", num/100+num%100/10+num%10);
}
숙제2: 각자리수의 합 구하기 소스:
#include <stdio.h>
void main(void)
{
int num;
printf("세자리수 입력: ");
scanf("%d" ,&num);
printf("각 자리 수의 합: %d \n", num/100+num%100/10+num%10);
}
댓글목록
등록된 댓글이 없습니다.