1- Write a recursive function to determine a given two strings are anagram or not.
Example anagram words:
Listen = Silent
Elvis = Lives
Admirer = Married
2- Write a recursive function that deletes all vowel characters from a given string.
Example:
Input: akraba
Output: krb
Satyapriya NayakPosted Dec 25, 2011, 1:04 PM
For the 2nd part solution
Try this...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string s1;
string s2;
s1 = "akraba";
s2 = System.Text.RegularExpressions.Regex.Replace(s1, "[aeiouAEIOU]", "") ;
MessageBox.Show(s2);
}
}
}
Thanks
If this post helps you mark it as answer
VulpesPosted Dec 25, 2011, 2:08 PM
It depends what you mean by 'calling' a console application. You can certainly start one from a windows forms application:
System.Diagnostics.Process.Start("myconsoleapp.exe");
To do those two questions using recursive functions, try the following:
// anagram.cs
// removevowels.cs
Taklaci GuvercinPosted Dec 25, 2011, 1:13 PM