+ 3
Who out there has any ideas that i can code in. c++?
15 Answers
+ 3
I you are good at c++ then you should be able to complete my challenges
https://code.sololearn.com/WHSVqhw98Vni/?ref=app
+ 3
Guys the double command is a way of defining terms just like int does; however, it is more accurate with the answers it gives. For example, int only does whole numbers and ignores decimals if you cout it or use it, but the double will give 4 places after the decimal. So if you used an int to cout an answer to a math problem and the answer is 2.7456789 the int will only allow 2 to be outputted, but a double would allow 2.7456 to be outputted.
So all summed up I would just say that they are interchangeable but double just gives a more exact number.
+ 2
Thanks I'll check it out.āŗ
+ 2
C++ is probably the most versatile language right now. You can do anything in it. What interests you? Computer vision? Server applications? Desktop GUIs? Game development?
+ 2
Phillip J Chaka what is mean of double thing in cpp i never listened before .
+ 2
K4l5iK
According to Phillip double mean a function he is asking what function do
+ 2
Noman accepted your challenge
#include <stdio.h>
int main()
{
int h = 3, l = 2, x = h - 1, i, j;
for (i = 0; i < h; i++)
{
for (j = 0; j < h * l * 2; j++)
{
if (j % (h * 2) == x)
{
printf("/");
}
else if (j % (h * 2) == h + i)
{
printf("\\");
} else {
printf(" ");
}
}
x--;
printf("\n");
}
return 0;
}
+ 2
ithink u should see before challange accept
Because I think u don't understand this https://code.sololearn.com/cC7QQ72HTaYa/?ref=app
+ 2
Create a wave take a two input one is height and second is width
+ 2
I hope u understand
+ 2
Noman double is not a function i think š
TheĀ doubleĀ is a data type built into the compiler and used to define numeric variables holding numbers with decimal points.
+ 2
Yup I know it is a built in data type
And it is more precise compare to float but I already say according to Phillip he is start programing here is some issue š
š
+ 1
bro accept this challange its little though
/*create a wave like this
/\ /\
/ \ / \
/ \/ \
here is two input one is height 3
width 2
and output is above */
#include <iostream>
using namespace std;
int main() {int h,w,c,r,temp,space;
cin>>h>>w;
for(r=0;r<h;r++)
{temp=h-r-1;
for(c=0;c<w;c++){
temp=c==0?temp:2*temp;
while(temp>=0){
if(temp>0){
cout<<" ";temp--;
}else{
cout<<"/";
for(space=0;space<(2*r);space++)
cout<<" ";
cout<<"\\";temp--;
}
}temp=h-r-1;}
cout<<endl;
}
return 0;
}//h is height and w is width
+ 1
does anyone know what the double thing helps in c++??
+ 1
Hey Phillip what's double thing