15.9.15

print all integer which are divisible by 3 using c++

/* Series of Integer which is divide by 3 */

#include<iostream>
#include<conio.h>
using namespace std;
int series(int start,int last)
{
    cout<<"The series which is divide by 3 is:"<<endl;
    for(int i=start;i<=last;i++)
    {
        if(i%3==0)
        {
            cout<<i<<"\t";
        }
    }
}
int main()
{
    int start,last;
    cout<<"Enter start value:"<<endl;
    cin>>start;
    cout<<"Enter Last value:"<<endl;
    cin>>last;
    series(start,last);
    getch();
    return 0;
}

2 comments:

  1. ID #201611036
    Link--> https://drive.google.com/open?id=1aNBjx4QYpHgLNmwr-ST5HnaHWRgYtBkU

    ReplyDelete
  2. https://drive.google.com/file/d/1N7l87gx-bWm_ixZ62vnEJ06n7TS2I8TT/view?usp=sharing

    ReplyDelete

Comment Here