0

Write a program to declare a structure having number 1 and number2 .Calculate sum and display on screen.

plz answer it fast

14th Nov 2018, 11:49 AM
Vaidehi Dawande
Vaidehi Dawande - avatar
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?
14th Nov 2018, 1:22 PM
HonFu
HonFu - avatar
+ 5
For multiple inputs, spilt them to newlines
14th Nov 2018, 3:10 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 1
Homework? You do it and show us!
14th Nov 2018, 12:21 PM
HonFu
HonFu - avatar
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; };
14th Nov 2018, 1:01 PM
Vaidehi Dawande
Vaidehi Dawande - avatar
0
plz ...tell me if there is any mistake
14th Nov 2018, 1:03 PM
Vaidehi Dawande
Vaidehi Dawande - avatar
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.
14th Nov 2018, 1:07 PM
HonFu
HonFu - avatar
0
But sir it is not working on my phone very properly
14th Nov 2018, 1:18 PM
Vaidehi Dawande
Vaidehi Dawande - avatar
0
Then you have to find a solution. Do this at a PC.
14th Nov 2018, 1:19 PM
HonFu
HonFu - avatar
0
I'm not having PC
14th Nov 2018, 1:20 PM
Vaidehi Dawande
Vaidehi Dawande - avatar
0
Vaidehi Dawande How you access to SL?
14th Nov 2018, 2:00 PM
KrOW
KrOW - avatar
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......
17th Nov 2018, 5:18 AM
Vaidehi Dawande
Vaidehi Dawande - avatar
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
17th Nov 2018, 6:32 AM
KrOW
KrOW - avatar