#include <stdio.h>
 
struct group             // 구조체 정의
{
    int a;
    double b;
};
 
int main(void)
{
    struct group g1;             // 구조체 변수 g1 선언
   
    scanf("%d %lf", &g1.a, &g1.b);     // 데이터 입력
   
    printf("g1.a의 값: %d \n", g1.a);
    printf("g1.b의 값: %lf \n", g1.b);
     
    return 0;

 

'프로그래밍언어 > C & CPP' 카테고리의 다른 글

문자열 표준함수  (0) 2014.08.12
두 복소수의 합,차,곱  (0) 2014.08.12
포인터와 함수  (0) 2014.08.11
삼항 연산자  (0) 2014.08.05
사용자 예외처리 클래스  (0) 2014.07.30

+ Recent posts