Skip to main content

Posts

Featured

Finding the series / Getting the output of this type: * * * * * * * * * * * * * *    * * * * * * * *          * * * * * *                * * * *                      * * *                         * //This code takes an input from the user, and verifies whether its a even no. or an odd no.. If it is an odd number gives the output, else(If it is a even no.)  it prints the message on the screen that please enter an odd no.and doesn't prints the output. #include<iostream> #include<math.h> using namespace std; int main() {     int size,left,right,count,mid;     cout<<"Enter the size of the series(width) :";     cin>>size;     if(size%2==0)     {         cout<<"Its even number, series won't be accurate, please give any odd number....";         return 0;     }     round(mid);     //size=9;     count=1;     left=right=mid=((size+1)/2);     for(int j=0;j<=((size+1)/2);j++)///or///for(int j=0;j<(size/2)

Latest Posts