I_Interface
std::cout << "Your text" << grad << std::endl; for example
Anonymous
i mean when i try to run as a code it shows enter math grade for math and prog: 64 bagsak lang sa ka junlie. shift lang sa ka But when i try to rean as an output it shows only enter math grade for math and prog bagsak lang sa ka junlie. shift lang sa ka
Anonymous
run*
Григорий
Because 64 is not output, is input.
I_Interface
Because 64 is not output, is input.
Ah, he means that, it's hard a bit to understand him :D
Mykyta
I am beginner in programming and i want to learn c programming completely
Oh no, one more hindi programmer. Please, do not make any videos in youtube
I_Interface
#ot
What ?
Dima
Noobs
Anonymous
Guys can u explain y we use this in our code ? " #include " nd i want t knw who invented the C and C++ programming language... Nd wot was their intenstion to invention ?
Anonymous
🙄
Anonymous
🤝
I_Interface
Thank u
but better for u if u will learn how to google what u need
Anonymous
But i need to knw more deep about C and CPP. Thats y I'm joined this group
I_Interface
But i need to knw more deep about C and CPP. Thats y I'm joined this group
This group is about help if u getting trouble with your code and don't know how to solve it
Anonymous
I think google can't explain evrything until i get understood
I_Interface
Anonymous
Ok
jack
i still dont get the problem in this code...its fine
I_Interface
i still dont get the problem in this code...its fine
He just didn't understand what he want :)
jack
😅
Sai Meghana
setprecision() is supposed to display as many decimal places as we need, right? for some reason my code isn't working .-.
Sai Meghana
int a; long b; char c; float d; double e; cin>>a>>b>>c>>d>>e; cout<<a<<endl<<b<<endl<<c<<endl<<setprecision(3)<<d<<endl<<setprecision(9)<<e;
Sai Meghana
Rajul
https://www.hackerrank.com/challenges/sock-merchant/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup
Rajul
int sockMerchant(int n, int ar_count, int* ar) { //int x = ar_count; int arr[10]={0}; int i,j,*temp,count=0; temp = ar; for(i=0;i<ar_count-1;i++){ for(j=1;j<ar_count;j++){ if(arr[i]!=1 && arr[j]!=1){ arr[i]=1; arr[j]=1; if((*(temp+i))== (*(temp+j))){ count++; } } } } return count; }
Rajul
guys will you tell me please where i was wrong
Sai Meghana
the question requires 9 decimal places strictly
Anonymous
I think you need to print each one in different lines
Anonymous
atleast that set precision output line
Anonymous
jack
i think there should be an error on setprecision
jack
its not declared in the scope
jack
but still it's giving output
Sai Meghana
i tried this too printf("%.3f\n",&d); printf("%.9lf\n",&e);
Anonymous
try this
Anonymous
cout«fixed«setprecision(9)«e«endl;
Rushi
I take string input like "129+x=156" or "x+123=130"or "120+139=x" and I have too calculate x how should I calculate??
Anonymous
Cool
Anonymous
I take string input like "129+x=156" or "x+123=130"or "120+139=x" and I have too calculate x how should I calculate??
load integer values from both ends. I mean, split the string by = and then +. You'll get both integer values of left hand side and right hand side
Anonymous
then add the left hand side values and right hand side values
Anonymous
substract and then
Anonymous
divide by 2
Sai Meghana
if u write on C++ - use only C++
but wont it work with <cstdio> and <iostream> both included?
Rushi
Thanks I got it....
I_Interface
but wont it work with <cstdio> and <iostream> both included?
why are u using cstdio ? it's C library Use only what u need
jack
Thanks I got it....
i dont get it
I_Interface
iostream is enough for ur task
Fabio
Hi
Nitul
Hello guys
Nitul
I want to learn c/c++ from Very beginning anyone willing to help me?
Fabio
learncpp.com
Fabio
ABDULLAH
Anonymous
ops i click yes,i didnt want😂
jack
ops i click yes,i didnt want😂
click on it again and do retract vote
Anonymous
👍
jack
👍
😊
Anonymous
😊
😁
Fabio
How
jack
Fabio
I think there's no way to let c++ die
I_Interface
/report ot
I_Interface
#ot
Nomid Íkorni-Sciurus
Hello, I have a class method GetData() in a defined class Is there a way I could replace the instance pointer to that method with another one ?
Nomid Íkorni-Sciurus
for example, something like MyObject->GetData = myPointerToFunction
Roxifλsz 🇱🇹
for example, something like MyObject->GetData = myPointerToFunction
Why not just make GetData into a function pointer?