i am currently self-studying c++ and i am currently stuck on this problem.
I want to create a program that save Text(string) and Number(double) loop.
#include <iostream>
#include <iomanip>
#include <cstring>
using namespace std;
int main() {
string words[999],addwords;
double numbers[999],addnumbers;
int totalwords=0,totalnumbers=0;
head:
cout << "Word: "; getline(cin,addwords);
words[totalwords] = addwords;
totalwords+=1;
cout << "Numbers: "; cin >> addnumbers;
numbers[totalnumbers] = addnumbers;
totalnumbers+=1;
goto head;
}
EOF
The output must be:
Words: Some Letters
Numbers: 010102
Words: Some Letters
Numbers: 010102
{loop}
The output of this code:
Words: Some Letters
Numbers: 010102
Words: Numbers: 202010
Thank you for help.