i am writing a program that asks the user for there name. with that we have to convert the name into numbers. for example a=1, b=2 and so on. once we do that we have to add them up. Also need help making sure if i have a whitespace it will equal to 0. thanks.
#include <iostream>
#include <string>
#include <iomanip>
usingnamespace std;
main ()
{
string name;
cout << "Please, enter your full name: ";
getline (cin,name);
cout << "Hello, " << name << "!\n";
for (int i = 0; i < name.size(); i++)
{
int Number= toupper(name[i])-64;
}
for(i = 0; i!=Number; i++)// NEED HELP ADDING the numbers
{
sum =+ int(name[i]);
}
return 0;
}