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 Solvers7
Suggested Problems
-
2731 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
786 Solvers
-
Get the length of a given vector
13789 Solvers
-
426 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!