7. กF scanf();
scanf();
Scanf( ) ก F F ก F
• กF F C
ก ก scanf( )
• F ก keyboard F ก F
F F (memory address )
ก ก F function scanf( ) F F F
F (address) F F
function scanf( )
8. ก F กF scanf();
scanf();
scanf( format string , &variable);
1. format string Fก ก ก
F
2. &variable ( ก F F ก
F ) F Fก F F
&name
9. F ก F กF scanf();
scanf();
F F
F
int month ,year;
scanf( %d %d , &month, &year);
ก ก F F
int i;
float x;
scanf( %d %f ,&i,&x);
10. F
#include<stdio.h>
#include<conio.h>
int main()
{
int year;
float salary;
clrscr();
printf(“Insert year experience and salary : ”);
scanf(“%d %f”,&year,&salary);
printf(“You worked for %d years.n”,year);
printf(“Your salary is %.2fn”,salary);
return(0);
}