QUESTION - DISPLAY THE WEIGHTED SUM
Write a program which, given a four digit number, displays the weighted sum of the number. The
weighted sum of a number is the total of multiplying each digit by its position in the number (counting from the left and starting from 1). For example, given the four digit number 2756 we calculatethewei ghtedsumofdigit sas: 2*1+7*2+5*3+6*4 whichequals55.
Paste the following statement into your program....