Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <iomanip>
- #include <cstring>
- #include "funzioni.h"
- using namespace std;
- int main(){
- fstream file;
- file.open("INPUT.txt");
- int n=0;
- file>>n;
- char** r=new char*[n];
- for(int i=0;i<n;i++){
- r[i]=new char[M];
- }
- file.getline(new char[2],2);
- for(int i=0;i<n;i++){
- file.getline(r[i],M);
- cout<<i+1<<")"<<r[i];
- cout<<"\t"<<setw(15);
- if(isPalindroma(r[i])){
- cout<<"PALINDROMA"<<endl;
- }else{
- cout<<"NON PALINDROMA"<<endl;
- }
- }
- cout<<endl;
- cout<<"La stringa piu' lunga e' la n."<<indexLenMax(r,n)+1<<" con "<<strlen(r[indexLenMax(r,n)])<<" caratteri."<<endl;
- cout<<endl;
- cout<<"La stringa con piu' vocali e' la n."<<indexVocMax(r,n)+1<<" con "<<numeroVoc(r[indexVocMax(r,n)])<<" vocali."<<endl;
- cout<<endl;
- cout<<"La prima stringa ad avere il carattere @ è la n."<<firstindexAt(r,n)+1<<".";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement