This is the car sale and the cars are arranged according to the pascal's Traingle.
1 0 0 0 0
1 1 0 0 0
1 2 1 0 0
1 3 3 1 0
1 4 6 4 1
Pattern like this so the car number is given like
n=10;
So,you have to create a pascal's traingle and add the numbers and you have to add like this:-
1 0 0 0 0
1 1 0 0 0
1 2 1 0 0
1 3 3 1 0
1 4 6 4 1
%You have to add the numbers on the traingle except the 0 and you will get a matrix like:-
1 0 0 0 0
2 3 0 0 0
4 6 7 0 0
8 11 14 15 0
16 20 26 30 31
So the number of the vehicle is given accoring to only positive numbers not 0 (Don't recognize zero when counting the vehical number!)
Following functions are not allowed!:-every function except eye,find,size
You have to output the pascal's traingle number you summed up on that particular row and column like
%if I asked
%input
n=10;
%Output Should be:-
y=15;
Wishing You luck!
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers6
Suggested Problems
-
Project Euler: Problem 10, Sum of Primes
2129 Solvers
-
Find the "ordinary" or Euclidean distance between A and Z
177 Solvers
-
Find the largest value in the 3D matrix
1687 Solvers
-
579 Solvers
-
Find out value of sine given by degree.
358 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!