תכנית הסבר לפונקציות הדפסה
/
*מגדירים ספריות שבהן קיימים פונקציות שנשתמש בהן במהלך התכנית, ד"א בתכנית
שלנו שתי הראשונות מספיקות */
#include<stdio.h>
#include<conio.h>
/ ****************************************************מגדירים
התחלת תכנית ************************************************/
void main()
{
/*****************************************מגדירים ומאתחלים
משתנים********************************************/
int number = 100 ;
int integer = 20;
/*****************************************והנה
הפקודות של התכנית*******************************************************/
/* פונקציה זו מוחקת את כל המסך עליו יוצג פלט
התכנית */ clrscr();
/*מדפיסה המשפט*/ printf ("The function printf is
printing this sentence\n")
printf ("I want to be %d percent of the lessons in this
year\n",number);
printf ("the first variable is %d the second is %d
\n", number, integer);
/* פקודה זו במקרה
שלנו תשמש לצורך הצגת הפלט עד אשר נלחץ על מקש כלשהו במקלדת */ getch();
/***************************** כעת נסיים את התכנית עם סוגריים מסולסלות **************************************/
}
-----------------------------------------------------------------------------------------------------------------------------------------
תוצאת ריצת התכנית
The function printf is printing this sentence
I want to be 100 percent of the lessons in this year
the first variable is 100 the second is 20