1
Which part of this code C++ I’m missing where I need to convert a whole word to lowercase?
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <ctype.h>
using namespace std;
int main(){
string nome = "Pedro";
int tam = nome.size();
int i;
for(i = 0 ; i < tam ; i++){
cout << tolower(nome[i]);
}
return 0;
}
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero