[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Please help, I have no idea
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 20
Thread images: 3
File: Snapchat-46426435882725015.jpg (492 KB, 1080x1920) Image search: [Google]
Snapchat-46426435882725015.jpg
492 KB, 1080x1920
Please help, I have no idea
>>
>>7656469
What do you mean you have no idea? You know exactly what to do, just follow the steps, jesus.
>>
>>7656469
http://stackoverflow.com/questions/3723592/what-is-the-c-equivalent-to-the-c-cin-statement
>>
File: Snapchat-5964154587458584352.jpg (409 KB, 1080x1920) Image search: [Google]
Snapchat-5964154587458584352.jpg
409 KB, 1080x1920
This is what I have so far. I don't know if it's any good.
>>
>>7656472
It is c++
>>
>>7656469
>>7656476
ahahaha get the fuck out you fucking scrub
Best leave this board. Can't even do the simplest shit.

You do not belong fucko
>>
>>7656476
try this:
for (i=1; i<=n; i++){
for (j=n; j>0; j--)
cout<<"*"
cout<<endl
for (k=1; k<=i; k++)
cout<<" "
}

Also this >>7656480
>>
>>7656476
not op and i have no background in programming but a little in bash scripting to make my linux desktop more cohesive

I can understand pretty much everything he is doing here but one thing that has always thrown me off about programming is shit like

cout.width
right

I mean cout is easy to understand, but how the shit am i supposed to know cout.width is even a thing, or "right", how am i supposed to know what that means or even that it exists?
>>
>>7656512
This is why I hate programming. Yes, I understand that programers have made shorthand notation that is more efficient to use, but unlike a math course the notation is not taught in any rigorous or structured way. Many times intro classes will just bounce around randomly or skip teaching the fundamentals, and then expect you to understand how to use code for the exams. Then when you take a higher level course they expect you to have learned all the notation. I don't have time to teach myself to code when I'm majoring in physics and sitting in a three hour lecture each week on what a class does while somehow never being taught how to use it in practice. At least my math courses have example problems even if they aren't applicable to the practical world. How come my computer science class has minimal examples like wtf no wonder STEM students think CS majors are outcasts.
>>
>>7656511
lol this wouldn't work.
>>
>>7656480
Don't be so needlessly assaultive towards anon.

I'm fairly sure even you yourself don't truly feel good after saying treating someone that way.
>>
>>7656543
yes it would.
>>
File: Snapchat-8860137434528159728.jpg (780 KB, 1080x1920) Image search: [Google]
Snapchat-8860137434528159728.jpg
780 KB, 1080x1920
Well I figured it out anyway faggots
>>
>>7656512
>I mean cout is easy to understand, but how the shit am i supposed to know cout.width is even a thing, or "right", how am i supposed to know what that means or even that it exists?


width is a subclass of class cout. its not very hard to understand. Although if your used to higher level programming languages like python or javascript, it would defiant be an adjustment if you started learning java.
>>
>>7656558
what was your code faggot
>>
>>7656558
>nvm guys, figured it out.
>thread closed 4 years ago.
>Nowhere else on the internet has anyone mentioned your exact problem.
>>
>>7656558
>someone gives you the exact answer
>hey i figured it out
>>>
>>
>>7656469
for(int h=0;h<n;h++){

for(int j=0;j<h;j++)
cout<<" ";

for(int i=0;i<n;i++)
cout<<"*";

cout<<"\n";
}

Are you retarded
>>
>>7656476
>cout.width
>right

HE SAID NO FUCKING iomanip FUNCTIONS. I don't care if they are in iostream but he clearly doesn't want you to use anything the automatic fucks with the output stream.

>>7656512
>I mean cout is easy to understand, but how the shit am i supposed to know cout.width is even a thing, or "right", how am i supposed to know what that means or even that it exists?

Because you search and read the documentation when you need something:
http://www.cplusplus.com/reference/ios/right/
http://www.cplusplus.com/reference/ios/ios_base/width/

Eventually you'll get a feel for when something is obvious/common enough that there is a function that already does what you want in the standard library.
>>
>>7656553
you forgot to declare i,j,k and semicolons
Thread replies: 20
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK