0
Write a program to declare a structure having number 1 and number2 .Calculate sum and display on screen.
plz answer it fast
12 Respostas
+ 2
So you have no phone that can handle sololearn's playground; you don't have a pc; you also have no access to a pc.
Yet for some reason you want to write this program.
What am I missing?
+ 5
For multiple inputs, spilt them to newlines
+ 1
Homework?
You do it and show us!
0
#include <iostream.h>
struct sum;
{
int number_1;
int number_2;
};
sum.obj name
void main ()
{
cout <<"enter number_1";
cin>> obj.number_1;
cout <<"enter number_2";
cin>> obj.number_2;
cout << obj.number_1 <<obj.number_2 << sum;
};
0
plz ...tell me if there is any mistake
0
Next step: Enter this in Code Playground and see if it runs.
If it doesn't run, read the error messages and repair what the compiler criticizes.
0
But sir it is not working on my phone very properly
0
Then you have to find a solution. Do this at a PC.
0
I'm not having PC
0
Vaidehi Dawande How you access to SL?
0
HON FU SIR, I have just started to do C++ programming .....it is new for me .....because this year only this C++ came in my computer course......so I'm getting confused and trying to solve some questions of programming in phone only......
0
Vaidehi Dawande This is your code where i have added some comments for you (it same like your code then you have to correct it but maybe comments will help you)
https://code.sololearn.com/cvJphtPccZEy/?ref=app