Computer Science, asked by Sharmagaurav8905, 10 months ago

WAP to print 20 terms of series 3n+2.Stop as 'soon as multiple of 4 is encountered​

Answers

Answered by iftikharzafar5576
0

yys

series 3n+2.Stop as 'soon as multiple of 4 is encountered

Explanation:

two charges + 20 microcoulomb and minus 20 microcoulomb are held 1 centimetre apart calculate the electric field at a point on the equatorial line at a distance of 50 cm from the centre of the dipole

Answered by poojakher99
13

Answer:

When n=20

Series :- 5,11,15,17,23,26,29,35,38,41,47,50,53,59,62,65,71,74,77,83

Explanation:

#include <iostream>

using namespace std;

int main()

{

  int n,s;

  cin>>n;

  for(int i=1;i<=1000;i++) {

       if(n!=0)

      {

            s=(3*i)+2;

            if(s%4!=0)

           {

               cout<<s<<" ";

               n--;

           }

     }

 }

   return 0;

}

Hope This Helps :)

Similar questions