Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Tech mahindra coding questions

#include<iostream>
using namespace std;
int calculateTotalInterest(int n, int arr[])
{
    int tax=0;
    for(int i=0;i<n;i++)
    {
        tax=tax+(int)((arr[i]-1000)*0.2);
    }
    return tax;
}
int main()
{
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++)cin>>arr[i];
    cout<<calculateTotalInterest(n,arr);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: uri online judge 1930 solution in c++ 
Cpp :: c++ pass argument to singleton 
Cpp :: is there an algorithm to create a truly random password 
Cpp :: cv2.threshold c++ 
Cpp :: Plus (programming language) 
Cpp :: can you verify adsense no ssl certificate 
Cpp :: check file exist cpp 
Cpp :: how to create a copy constructor for generic array class in c++ 
Cpp :: declare dictionary cpp 
Cpp :: non stoichiometric nacl is yellow 
Cpp :: average of a matrix c++ 
Cpp :: void value not ignored as it ought to be 
Cpp :: rotate in cpp 
Cpp :: c++ random number generator 
Cpp :: ifstream relative file path 
Cpp :: how to get a word from file c++ 
Cpp :: c++ std::fmin 
Cpp :: c++ print byte as bit 
Cpp :: c++ check if file exits 
Cpp :: separating class into header and cpp file 
Cpp :: c++ check if string contains uppercase 
Cpp :: switch in c++ 
Cpp :: C++ convert vector of digits into integer 
Cpp :: read file into vector 
Cpp :: c++ program to take input from user 
Cpp :: c++ functions 
Cpp :: take pieces of a string in c++ 
Cpp :: struct and array in c++ 
Cpp :: height of bst cpp 
Cpp :: cpp create multidimensional vector 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =