YEA i'm pretty sure that what i have to do but at increment of 2 i think.
When user enters a number, check if it is even or odd using mod operator, if it is even then add one to the number. ...
Type: Posts; User: kelvin2355
YEA i'm pretty sure that what i have to do but at increment of 2 i think.
When user enters a number, check if it is even or odd using mod operator, if it is even then add one to the number. ...
----*
---***
--*****
-*******
*********
-*******
--*****
---***
----*
that is sample kind of code that i wanted to print out...without dotted line
the first part is like a pyramid and the second part is pyramid but upside down.
Should i use a mod operator to test for even or odd first cuz isn't pyramid pgm will only work for odd numbers.. oh...
thanks i think i figured it out :)
#include<iostream>
using namespace std;
int main(void)
{//declaration of variables
int num; //value of first integer
int count; //value of second integer
cout<<"Please enter an integer...
#include<iostream>
using namespace std;
int main(void)
{//declaration of variables
int i;
int num[10];
int temp;
for (i=0; i<=9; i++)