TCS
Company
Numerical Ability
Number System
If f(x) = sum of all the digits of x, where x is a natural number, then what is the value of f(101)+f(102)+f(103)+ .. +f(200)?
Option 1 : 1000 Option 2 : 784 Option 3 : 999 Option 4 : 1001
Read Solution (Total 6)
-
- option 4:1001
A/c to f(x) f(101)=2,f(102)=3......f(199)=19,f(200)=2
sum of f(100) to f(109)=1+2+3+4+5+6+7+8+9+10
f(110) to f(119)=2+3+4+5+6+7+8+9+10+11=>1+2+3+4+5+6+7+8+9+10+10
f(120) to f(129)=1+2+3+4+5+6+7+8+9+10+20
. .
. .
f(190) to f(199)=1+2+3+4+5+6+7+8+9+10+90
=>sum of f(100) to f(199)=10(55)+10(1+2+....+9)=10(55)+10(45)=1000
sum of f(101) to f(199)=1000-1=999
sum of f(101) to f(200)=999+2=1001
option 4:1001
- 9 years agoHelpfull: Yes(11) No(0)
- option 3:999
A/c to f(x) f(101)=2,f(102)=3......f(199)=19,f(200)=2
sum of f(100) to f(109)=1+2+3+4+5+6+7+8+9+10
f(110) to f(119)=2+3+4+5+6+7+8+9+10+11=>1+2+3+4+5+6+7+8+9+10+10
f(120) to f(129)=1+2+3+4+5+6+7+8+9+10+20
. .
. .
f(190) to f(200)=1+2+3+4+5+6+7+8+9+10+90
=>sum of f(100) to f(200)=10(55)+10(1+2+....+9)=10(55)+10(45)=1000
sum of f(101) to f(200)=1000-1=999
option 3:999 - 9 years agoHelpfull: Yes(3) No(4)
- 4:1001
54+65+75+85+95+105+115+125+135+145+2 - 9 years agoHelpfull: Yes(2) No(4)
- 100(1) +10(0+1+2+..9)+10(0+1+2+3..9)=1000 but we take it from 100 so we will add 1 for 200 so answe will be 1001
- 9 years agoHelpfull: Yes(1) No(0)
- option 4:1001
According to f(x) f(101)=2,f(102)=3......f(199)=19,f(200)=2
sum of f(100) to f(109)=1+2+3+4+5+6+7+8+9+10
f(110) to f(119)=2+3+4+5+6+7+8+9+10+11=>1+2+3+4+5+6+7+8+9+10+10
f(120) to f(129)=1+2+3+4+5+6+7+8+9+10+20
f(190) to f(199)=1+2+3+4+5+6+7+8+9+10+90
=>sum of f(100) to f(199)=10(55)+10(1+2+....+9)=10(55)+10(45)=1000
sum of f(101) to f(199)=1000-1=999
sum of f(101) to f(200)=999+2=1001
option 4:1001 - 8 years agoHelpfull: Yes(1) No(0)
- Ans is 1001.
c code solution ;
#include
int main()
{int i;
int sum=0;
int temp=0;
int no=0;
int track=0;
for(i=101;i - 6 years agoHelpfull: Yes(0) No(0)
TCS Other Question