Problem 49840. Our Dad went to Buy a car But the car seller can't think the easiest way to get the car out Give Him a solution!

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

19.23% Correct | 80.77% Incorrect
Last Solution submitted on Nov 18, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers5

Suggested Problems

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!