# Daily Challenge #84

Hi
Finally the day came which I was waiting for weeks
Although I wanted to make 85th DC but no one posted 84th DC so I have to post it.
Today’s challenge is to make a procedure which takes

``````a - initial value
d - common difference
f - number of terms
``````

as input (int) and returns the terms of A.P.(arithmetic progression) in CSV format.
Something like this:

Note: 1.Number of blocks does not matters.You can use as much blocks as you want but don’t compromise with speed and accuracy
2.number of terms means next n number of terms.First number is the initial value and you have to find next n terms of A.P

Arithmetic Progression is 5th chapter of my Math’s book which I have read today in the morning

4 Likes
I've given it a try!
1 Like

I have almost solved the challange
One dout If the no. Of terms is 5 then why the o/p is 6.

I am not so good in maths

2 Likes

Oops…my mistake
I forgot to mention that number of terms means next n number of terms.
First number is the initial value and you have to find next n terms of A.P.

2 Likes

Noooo! I missed it. I think I still have time.

It’s 10:06 in EU. And you’re saying

Well, for me, the DC has just began!

2 Likes

Here is mine

My blocks

2 Likes

@dora_paz the output should be is csv format. See the first post.

Btw, here is mine

My solution

Total block = 18

Proof of functionality:

3 Likes

Here is my solution:

Well done guys
Everyone has posted unique and correct solution so it was quite hard for me to choose the best solution.
But since @Fabio posted the correct solution first so I think he deserves this Green Tick

3 Likes

So we have to compete who is faster rather than who has the best answer?

1 Like

No , not at all.
You have to compete to post the best solution.
As I said

But I can’t mark everyone’s post as solution so I thought to go with his solution.
Everyone’s solution was best and I appreciate your work

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.