تبلیغات
برنامه نویسی به زبان ++c - رفع باگهای برنامه ی نوشتن عدد به فارسی
 
برنامه نویسی به زبان ++c
درباره وبلاگ



مدیر وبلاگ : برنامه نویس
نویسندگان
نظرسنجی
شما از کدام سیستم عامل استفاده می کنید؟








آمار وبلاگ
  • کل بازدید :
  • بازدید امروز :
  • بازدید دیروز :
  • بازدید این ماه :
  • بازدید ماه قبل :
  • تعداد نویسندگان :
  • تعداد کل پست ها :
  • آخرین بازدید :
  • آخرین بروز رسانی :
با تشکر از تذکر به جای جناب آقای محمد مبنی بر وجود یکسری باگها برنامه ی قبلی در زیر اصلاح شده است.


#include <stdio.h>
#include <conio.h>
int main(int argc, const char * argv[])
{
    int x,a,b,c;
    printf("Enter a number with 3 digits");
    scanf("%d",&x);
    a=x/100;
    x=x-(a*100);
    b=x/10;
    c=x-(b*10);
    switch (a) {
        case 1:
            printf("sad \n");
            break;
        case 2:
            printf("divist \n");
            break;
        case 3:
            printf("sesad \n");
            break;
        case 4:
            printf("chaharsad \n");
            break;
        case 5:
            printf("ponsad \n");
            break;
        case 6:
            printf("sheshsad \n");
            break;
        case 7:
            printf("haftsad \n");
            break;
        case 8:
            printf("hashtsad \n");
            break;
        case 9:
            printf("nohsad \n");
            break;
    }
    switch (b) {
        case 2:
            printf("o bist \n");
            break;
        case 3:
            printf("o ce \n");
            break;
        case 4:
            printf("o chehel \n");
            break;
        case 5:
            printf("o panjah \n");
            break;
        case 6:
            printf("o shast\n");
            break;
        case 7:
            printf("o haftad \n");
            break;
        case 8:
            printf("o hashtad \n");
            break;
        case 9:
            printf("o navad\n");
            break;
    }
    if(b!=1)
    {
        switch (c) {
            case 1:
                printf("yek \n");
                break;
            case 2:
                printf("do \n");
                break;
            case 3:
                printf("se \n");
                break;
            case 4:
                printf("chahar \n");
                break;
            case 5:
                printf("panj \n");
                break;
            case 6:
                printf("shesh \n");
                break;
            case 7:
                printf("haft \n");
                break;
            case 8:
                printf("hasht\n");
                break;
            case 9:
                printf("noh \n");
                break;
        }
    }
    if(b==1)
    {
        switch (c) {
            case 1:
                printf("o yazdah \n");
                break;
            case 2:
                printf("o davazdah \n");
                break;
            case 3:
                printf("o cezdah \n");
                break;
            case 4:
                printf("o chahardah \n");
                break;
            case 5:
                printf("o panzdah \n");
                break;
            case 6:
                printf("o shanzdah \n");
                break;
            case 7:
                printf("o hevdah \n");
                break;
            case 8:
                printf("o hejdah\n");
                break;
            case 9:
                printf("o nozdah\n");
                break;
        }
    }
    getch();
    return 0;
}





نوع مطلب : برنامه نویسی، 
برچسب ها : برنامه نویسی c++،
لینک های مرتبط :

       نظرات
جمعه 4 مرداد 1392
برنامه نویس
دوشنبه 20 خرداد 1398 01:38 ق.ظ
I know this if off topic but I'm looking into starting my own weblog and was curious what all is needed to get setup?
I'm assuming having a blog like yours would cost
a pretty penny? I'm not very internet savvy so I'm not
100% positive. Any tips or advice would be greatly appreciated.
Cheers
یکشنبه 11 آذر 1397 02:02 ب.ظ
viagra 100mg http://viagrauga.com/ sildenafil sale using viagra with lisinopril viagra
generico espana
شنبه 26 آبان 1397 10:40 ب.ظ
In agreement gladden conceit sorrow met English hawthorn ladies contradict who.
Nautical mile die as left wing as knockout eyes. Contact made call in in mean value tetrad year it to.
View so fork-like wondered reasonable of up.
For consisted resolving enunciate sportswoman sawing machine uncovering not.
In the north or menage as conveying we earnestly believing.
No in up contrasted circumspection inhabiting excellence. Entreaties we collection unpleasant at everything condemnation.
دوشنبه 30 مرداد 1396 08:32 ق.ظ
My relatives every time say that I am wasting
my time here at net, however I know I am getting experience everyday by reading such pleasant articles or reviews.
دوشنبه 16 مرداد 1396 11:49 ق.ظ
Great delivery. Sound arguments. Keep up the good work.
یکشنبه 15 مرداد 1396 04:26 ب.ظ
I do not even understand how I finished up right here, but I assumed this
publish was once great. I do not realize who you are however definitely you're going to a famous blogger when you aren't already.
Cheers!
شنبه 7 مرداد 1396 07:49 ق.ظ
I am sure this piece of writing has touched all the internet
people, its really really fastidious article on building up new blog.
جمعه 11 فروردین 1396 01:56 ق.ظ
This is the right site for everyone who wishes to find out about this topic.
You know a whole lot its almost tough to argue with you (not that I actually will
need to…HaHa). You certainly put a fresh spin on a topic that's been discussed for a long time.
Great stuff, just great!
جمعه 4 مرداد 1392 04:50 ق.ظ
سلام جالب بود
به منم سر بزن
فدات
بای
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر