Write a program to accept a word and convert it into lowercase if it is in uppercase and display the new word by replacing only vowels with the character following it.
e.g. Sample input: computer
Output: cpmpvtfr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Q32011{ | |
public static void main(String []args){ | |
Scanner s=new Scanner(System.in); | |
String str,newstr=""; | |
int len; | |
char ch; | |
System.out.println("Enter String: "); | |
str=s.next(); | |
str=str.toLowerCase(); | |
len=str.length(); | |
for(int i=0;i<lenl;i++){ | |
ch=str.charAt(i); | |
if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){ | |
ch=(char)(((int)(ch))+1) | |
newstr+=ch; | |
} | |
else | |
newstr+=ch; | |
} | |
System.out.println(newstr); | |
} | |
} |
What is Shifting agriculture? Shifting Agriculture also known as 'Slash-and-Burn' method is a very common practice of cultivation prevalence in countries such as India. In this method, farmers make a small clearing in the forest where the cultivation of crops is done solely dependent on monsoon rain for irrigation and natural fertility of soil. No artificial input of either irrigation or fertilizer is given by the farmer. This method is very harmful to the environment. Shifting agriculture Key features of Shifting agriculture: Following are the key features of shifting agriculture: It is practiced on small patches of land with the help of primitive tools. It is also called jhumming , agriculture where the farmers make a small clearing in the forest, cultivate it for some years and then abandon it when the fertility of the soil diminishes. They then shift to another fresh clearing in the forest. This is also called slash-and-burn agriculture. The patch of land is usu...