Sunday, May 29, 2016

8:13 AM


অ্যালগরিদমঃ


        (১) প্রোগ্রাম শুরু।

        (২) ইনপুট হিসাবে n এর মাধ্যমে গ্রহণ।

        (৩) ধরি f = 1 এবং c = 1.

        (৪) ধরি f = f × c

        (৫) ধরি c = c + 1

        (৬) তুলনাঃ c এর মান কি n এর চেয়ে বড়?
             (ক) যদি না হয় তবে ৪ নং ধাপে গমন।
             (খ) যদি হ্যাঁ হয় তবে ৭ নং ধাপে গমন।

        (৭) ফলাফল f এর মাধ্যমে প্রদর্শন।

        (৮) প্রোগ্রাম শেষ।


ফ্লোচার্টঃ



প্রোগ্রামঃ


#include<stduo.h>

#include<conio.h>

main ()

  {

    clrscr();

    int f, n, c;

    f = 1;

    printf("Enter the number:");

    scanf(“%d”, &n);

    for(c = 1; c <= n; c++)

    f = f * c;

    printf("The result is: %d", f);

    getch();

  }


        এর আউটপুট হলোঃ



বিঃ দ্রঃ ভালো লাগলে অবশ্যই শেয়ার করতে হবে।

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top