Please help on making a program in c++? Thank you very much?
Produce a program of which willl yield n amount of items of the sequence given the value of n from keyboard reviews.The software prints accents you want of the particular sequence plus its sum.
Algorithm:
this sequence:
YOU 1 YOU 3 5 VARIOUS 9 SEVENTEEN…..
a.initialize the initial three items; t1=1, t2=1, t3=1 and S=3 ( payment of t1, t2 and t3).
b.the following item t4, in the actual sequence is definitely determide from the sum preceding 3 OR MORE items:
t4=t1+t2+t3 and is also combined with the quantity, S on the sequence ERSUS = S+t4.
c.to generate the following items, t1, t2 posting t3 are usually reassigned as follows:
t1=t2; t2=t3 and t3=t4.
ve had.repear actions b and c right up until n quantities of items on the sequence is actually generated..
please do it using though loop, do-while loop and for loop.
What help do you need How far maybe you have gotten What’s giving you trouble
In conversation with help somebody learn to play the piano by enjoying the music for all of them.That wouldn’t help them by any means.
Try this
include
int main()
int t1=1, t2=2, t3=1, t4, utes, i=0, no;
cout<<Please enter the volume of times to help rotate this loop;
cin>>no;
while(i<no)
s=t1+t2+t3;
cout<<t1<<t2<<t3<<s;
t4 = t1+t2+t3;
s=s+t4;
cout<<s;
t1=t2;
t2=t3;
t3=t4;
i++;
come back 0;
With thanks hope the following helps.
Leave a Reply
You must be logged in to post a comment.