Computer Science, asked by totoyfranz, 19 days ago

comparing NBA basketball team favorites. the computer assumes its favorite team is the lakers. its program will ask for the users favorite team then it will be compared if they have the same favorite team or not. the computer program will display its response to the comparison

make a c++ statement comparing the same or not same result​

Answers

Answered by sangeetavishnu21
0

Answer:

not NBA basketball team favorite

Answered by Tulsi4890
0

The C++ statements are given below:

#include <stdio.h>

#include<iostream>

using namespace std;

int main()

{

    printf("Enter the name of your favourite team:- ");

   string team;

   cin>>team;

   

   //converting the input team name to all lowecase for comparison with lakers

   transform(team.begin(), team.end(), team.begin(), ::tolower);

   

   if(team=="lakers"){

       

       printf("YAY! We have the same favourite team");

       

   }else{

       printf("No we don't have the same favourite team");

   }

 

   return 0;

}

Similar questions