know yourselves. information, computer, 7 wonders, various.

Sunday, November 12, 2017

C++ programming language part: 34 I/O Function


I/O Function

In processing records, you might have a program that requires interactive input from you and we have already known what us output functions. Here is a simple function  thats prompts the yours for his/her age and then returns it. It repeatedly requests input until it receives an integer in the range 1 to 120. 

Program 29_5

             int  age()
             {
              int n;
              while((n>0) || (n<120 a="" always="" be="" can="" infinite="" it="" likes="" loop="" means="" nbsp="" o:p="" possible="" true="" while="">
               {
               cout<<"How old are you ";
               cin>>n;
               if(n<0 :="" age="" be="" could="" cout="" endl="" negative="" not="" o:p="" our="">
               else if(n>120) cout<<" You could not be over 120 "<
               else return n;
               cout<<"Try again"<
               }
               }
             void main()
             {                                                                          // int a=age(); could possible
              cout<<"You are "<

             }


Part- 86 assign the content of twostring



জ্ঞানকোষ প্রকাশনী
৩৮/২-ক, বাংলাবাজার (২য় তলা), ঢাকা।
       ফোনঃ ৭১১৮৪৪৩, ৮১১২৪৪১, ৮৬২৩২৫১.         
                                                     
কলকাতায় পরিবেশক/প্রাপ্তিস্থান
রিতা ইন্টারন্যাশনাল
৩৬, পি.এন. ব্যানার্জি রোড, কলকাতা
ফোনঃ ২৫১৩৮৩৫৯, ৯৮৩০৪৩৯৬৭৯, +৯১৯৮৩০৪৩৯৬৭৯


C++ programming language part: 35 Boolean Functions


Boolean Functions

In some situation it is helpful to use a function to evaluate a condition, typically within an if statement or a while statement. Such functions are called Boolean functions. Each of the following functions is predefined in the header file.

Program 29_6_1
 //Boolean  function (functiondemo)
             void catagory_of_character(char c)
             {
              cout<<"The Cheracter ["<
              if      (isdigit(c)) cout<< "digit."<
              else if (islower(c)) cout<< "lower-case letter."<
              else if (isupper(c)) cout<< "upper-case letter."<
              else if (isspace(c)) cout<< "white space character."<
              else if (iscntrl(c)) cout<< "control character."<
              else if (ispunct(c)) cout<< "punctuation mark."<
              else                 cout<< "Error."<
              }
             void main()
             {
              for(int c=0;c<56 c="" o:p="">
              catagory_of_character(c);

             }

Part- 86 assign the content of twostring



জ্ঞানকোষ প্রকাশনী
৩৮/২-ক, বাংলাবাজার (২য় তলা), ঢাকা।
       ফোনঃ ৭১১৮৪৪৩, ৮১১২৪৪১, ৮৬২৩২৫১.         
                                                     
কলকাতায় পরিবেশক/প্রাপ্তিস্থান
রিতা ইন্টারন্যাশনাল
৩৬, পি.এন. ব্যানার্জি রোড, কলকাতা
ফোনঃ ২৫১৩৮৩৫৯, ৯৮৩০৪৩৯৬৭৯, +৯১৯৮৩০৪৩৯৬৭৯