advertisements
السلام عليكم
اليوم بإذ الله سنشرح الدوال التكرارية
وبالضبط الدالة For
سأضع لكم أكواد المستخدمة في الشرح
CODE 1 :
Lessson : For loop i++ <==> i=i+1; i-- <==> i=i-1; j=i++ <==> j=i et i=i+1 j=++1 <==> j=i et i=i+1 for ( variable initialization; condition; variable update ) { Code }
CODE 2 :
/* inifite loop for(;;) { printf("helllo"); } */ #include "stdio .h" #include "stdlib .h" main () { int i; for(i=0; i < 10 ;i++) { printf("helllo"); printf("\n%d\n",i); } system("pause"); }
CODE 3 :
#include "stdio.h" #include "stdlib.h" main () { int i,j; i=2; j=++i; printf("\ni = %d\n",i); printf("j = %d\n",j); printf("\n\n\n",j); system("pause"); }
فديو الشرح :
في أمان الله
0 commentaires :
Publier un commentaire