Dates are commonly printed in several different formats in bussiness correspondance.two of the more common formats are :21/07/55 and july21,19955
Write aprogram that reads a date in the first format and prints that date in the second format
The program should print an error message,if the month is greater than 12 or the date is greater than 31
مثلا هو راح يدخل
21/2/66
وراح يستقطع 21
وراح يطلع الشكل
/2/66
كيف راح اخذ 2؟؟؟؟؟؟؟؟؟؟؟
ولاحظوا اني راح استخدم strstr
اللي تستخدم في البحث عن داله داخل داله
هذي محاولتي لاااكن يوجد خطاء البرنامج مايطلع مثل المطلوب انا جربت البرنامج كانه عدد صحيح
#include<stdio.h>
main()
{
int a,b,c;
printf("enter daten");
scanf("%d%/d/%d",&a,&b,&c);
switch (b){
case 1:
"januay";
break;
case 2:
"feb";
break;
default:
printf("error");
}
printf("%d%s19%d",a,b,c);
return 0;
}طبعا البرنامج اللي كاتبته مو كامل
وكيف استخدمه لم يدخل التاريخ كانه متسلسله
وشكررررا