DataTypes Format
DataTypes Format
Date
Types Code Function How to be implemented
Format
%d just to let the IDE understands printf("hello my number is : %d%d \
that there is an integer will be n", 10, 20);
written now 😊
output should be :
Hello my num is : 1020
printf("Hello My Number is :
Int %0*d Just to let the IDE prepare to %0*d \n",6, 12);
receive, expect an int number with
known width determine by zero output should be :
Note that : u can not modify the 000012
zero.
%.*f The * in %.*f indicates that printf(" let us try : %.*f",
3, 1.1210012);
the precision of the
floating-point value
should be determined
dynamically at runtime. output should be : 1.121
The precision value is
passed as an additional
argument to printf.
The f specifies that the
argument being formatted
Float is a floating-point value.
out put
mohamed saleh nasr
Cرقم% عمل عدد فراغات printf("MOHAMED
;)'SALEH %6c ", 'ah
mohamed saleh ah
يبقى في عالمه في الكود علشان تعرفنا ان ده Note : علشان ال تنسى الزم
تفتكر الرقم بعد الدوت الى هو استار معناه بيشير فلوت وكمان علشان
منه فلو سيبنا االستار يبقى الزم نكتب الرقم بعد لكام رقم هتاخد
يبقى الزم نحط مكان االستار الرقم ال هيتحسب من بعد االسترينج لو شلناه
العالمه