Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

fix it ends when it says cout how to get the protons and neutrons do you know the fix please

+9 votes
asked Jan 15 by saif khalid saif salem almansoori (470 points)
#include <iostream>
using namespace std;

int main()
{
    char w;
    cout << "Science progect SK.\n";
    cout << "You have 3 chooses.\n";
    cout << " what is the smallest partical in the world  enter(a)  atom  (c) cells and  (e) element.\n";
    cin >> w;
    cout << "if you said Atom your correct";//y means yes n means no
    char t;
    cin >> t;
    if(t=='y'){
        cout << "how to get the atomic number and atomic mass";
        
    }

cout << "how to get the protons and neutrons of an element (a) Atomic mass  atomic number (b) atomic number  atomic mass";
    
    return 0;
}

its in   cout << "how to get the protons and neutrons of an element (a) Atomic mass  atomic number (b) atomic number  atomic mass";

2 Answers

0 votes
answered Jan 16 by Peter Minarik (40,320 points)

it ends when it says

cout << "how to get the protons and neutrons of an element (a) Atomic mass  atomic number (b) atomic number  atomic mass";

Of course it does. That's the last instruction. Nothing follows, except the return statement

commented Jan 16 by saif khalid saif salem almansoori (470 points)
ok how do i fix it
commented Jan 17 by Peter Minarik (40,320 points)
There is nothing to "fix". There are no problems. If you want to add more instructions, then you can do so.
0 votes
answered Jan 30 by Jeff The Chicken (2,840 points)

Add instructions that calculate atomic mass and number?

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...