60 636
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #24477 in C++ for arem marcial

Question #24477
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).
Expert's answer
#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;
}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions