Is basically my homework.. I know that You have to do it yourself but please provide me starting codes... will i use increments?.. my prof said to use loops... and you have to input an amount for "*" that will be printed when compiled.. T.T
i had this in mined though..
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int a;
int b;
int c;
int d;
cout<<"Enter a value for diamond size: ";
cin>>a,b,c,d;
do
{
}
while(
getch();
return 0;
}
i dunno what to put in the do statement.. and my prof says to put increment.. O.o he didnt even teach about float or increment stuff.. please help.. what should i think about first or what step?..
Your professor shouldn't be teaching you to use conio.h, but it doesn't surprise me.
by increment he means 2 for loops how about you replace the above code with this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
usingnamespace std;
int main()
{
int size;
cout << "Enter diamond size";
cin >> size;
for ( int i=0; i<size; i++ )
{
for ( int j=0; j<size; j++)
{
// put stuff in here
}
}
return 0;
}