Create a program using a linked list that will ask the user to input names of students and output all the names that ends with r or c (in outputNames.txt).
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
char username[50];
int numbersofstudent;
cout<<"Input number of students: ";
cin>>numbersofstudent;
for(int i=0;i<numbersofstudent;i++){
cout<<"Input names of students: ";
cin>>username;
}
for(int i=0;i<numbersofstudent;i++){
if(username[strlen(username)]=='r' ||username[strlen(username)]=='c'){
cout<<username<<"
";
}
}
getch();
return 0;
}