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



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