วันพฤหัสบดีที่ 13 ธันวาคม พ.ศ. 2555

                         คำสั่ง printf   

#include<stdio.h>
main()
{

    int a,b;
    float c;
    char sex[10];
     printf("Enter No>>>");
     scanf("%d",&a);
     printf("Enter Sex>>>");
     scanf("%s",sex);
     printf("Enter Age>>>");
     scanf("%d",&b);
     printf("Enter GPA>>>");
     scanf("%f",&c);
     printf("No is :%d Sex is :%s Age is :%d GPA is :%.2f",&a,sex,&b,&c);

}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น