Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 164 - CoreGPT(Podar)_Flipbook_C8
P. 164

    cout<<"Good night.";
                               }
                               else

                               {
                                   cout<<"Good evening.";
                               }.

                                                             Mind Boggler

                                                                                                      21 st   #Critical Thinking
                                                                                                   Century
                         Competency-based questions.                                                 Skills  #Technology Literacy

                         1.  Avina is writing a C++ program where she needs to make a decision based on the user's input.
                            She is unsure which statement to use to check a condition and make a decision. Which conditional
                            statement should she use?
                         2.  Rani is trying to create a variable called 2ndVariable in C++, but the compiler shows an error. What
                            might be the issue with the variable name?

                       Lab Session                                                                Century   #Technology Literacy
                                                                                                    21 st
                                                                                                    Skills

                              Write a program to calculate simple interest.
                            Hint: The formula for Simple Interest is:
                            SI = (P * R * T ) / 100

                            where,
                            P is for principle amount
                            R is for rate of interest
                            T is for time duration

                            Write a program to convert the given number of days into months and days.
                            (Consider 30 days = 1 month)
                           Type the following program and see the output:
                            #include<iostream.h>
                            #include<conio.h>
                            void main()
                            {
                                int a, b;
                                a = 20;
                                b = -10;
                                clrscr();
                                a = ++a;

                    162     Premium Edition-VIII

| 159 160 161 162 163 164 165 166 167 168 169 |