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).
1
Expert's answer
2013-02-19T09:19:41-0500
#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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS