It is possible that a user enters a lower case and i want to

It is possible that a user enters a lower case and i want to change it to upper case immediately, but i dont know how. Please help.

using nan espace std, int main() const double Xbase 2.ae, Xininute 0.22 xile a 1.15 xminimum 6.55, Sbase 15.00 Sminute -0.9e, Smile -3.75, Saininum 25.00 Lbase 00, Lminute -e.se, Unile -2.75 s Lminimum 10.55 double x, s, 1, total, sx ss, sl, Y, NJ char words option string name int n, d, Navigate users to enter information cout cin name i Enter the minutes: \"I cin ri Enter the miles cout cin di s\' for suv or \'L\' for luxury: Enter \"X\" for uberx cout cin words cout Enter \"Y\" if surge or N\' if not if(option \"Y ll option \"y\") cout Enter surge multiplier: \"i cin compile Log Debug Find Results 9l close Errors warnings: output Filename: D: VCIs 22A Lab 4.exe output size 1.83600425720215 MiB Compilation Time t o B6 Done parving in 0.032 seconda

Solution

/*

* Upper.cpp

*

* Created on: 26-Feb-2017

*   

*/

#include<iostream>

using namespace std;

int main(){

string name;

char words,option;

cout<<\" Enter name\";

cin >>name;

cout <<\" Enter \'X\' for uberX or \'S\' for SUV or \'L\' for luxury: \";

cin>>words;// change from lower to upper case

if(islower(words))

{

words = toupper(words);

cout << words;

}

cout << \"Enter \'Y\' if surge or \'N\' if not: \";

cin>>option;

if(option==\'Y\'||option==\'y\')

{

//.....

//....

}

}

 It is possible that a user enters a lower case and i want to change it to upper case immediately, but i dont know how. Please help. using nan espace std, int m
 It is possible that a user enters a lower case and i want to change it to upper case immediately, but i dont know how. Please help. using nan espace std, int m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site