Computer Science With C++ Chapter 3 Classes And Objects
  • Sponsor Area

    NCERT Solution For Class 12 Computer And Communication Technology Computer Science With C++

    Classes And Objects Here is the CBSE Computer And Communication Technology Chapter 3 for Class 12 students. Summary and detailed explanation of the lesson, including the definitions of difficult words. All of the exercises and questions and answers from the lesson's back end have been completed. NCERT Solutions for Class 12 Computer And Communication Technology Classes And Objects Chapter 3 NCERT Solutions for Class 12 Computer And Communication Technology Classes And Objects Chapter 3 The following is a summary in Hindi and English for the academic year 2021-2022. You can save these solutions to your computer or use the Class 12 Computer And Communication Technology.

    Question 1
    CBSEENCO12011568
    Question 2
    CBSEENCO12011618

    Write the definition of a function FixPay(float Pay[], int N) in C++, which should modify each element of the array Pay having N elements, as per the following rules:

    Existing Value of Pay Pay to be changed to
    If less than 100000 Add 25% in the existing value
    If >=100000 and <20000 Add 20% in the existing value
    If >=200000 Add 15% in the existing value

    Solution
    void FixPay(float Pay[ ], int N)
    {
    	for (int i=0;i<N;i++){
    		if(Pay[i]<100000){
    			Pay[i]+= 0.25 * Pay[i];
    		}
    		else if (Pay[i]>=100000 && Pay[i]<20000){
    			Pay[i]+= 0.2 * Pay[i];
    		}
    		else if(Pay[i]>=200000){
    			Pay[i]+= 0.15 * Pay[i];
    		}
    	}
    }

    Mock Test Series

    Sponsor Area

    Sponsor Area

    NCERT Book Store

    NCERT Sample Papers

    Entrance Exams Preparation

    24