PROJECT TITLE: Sb_@y&M
PURPOSE OF PROJECT: promote the language of java and also to motivate the youths towards the ultimate logical sense
VERSION or DATE: Saturday, November 01, 2014,
HOW TO START THIS PROJECT: clicking
AUTHORS: one and only SB_!(@
USER INSTRUCTIONS: just get adddicted!@@ it has lots of patterns and riddles to solve
just do it men!!!.hang out with java in facebook ,twitter , whats Ap,and gmail toooo
just solve the logic in ur mind u'll do it
a unique program in java
AIM: to print initials of a name
import java.util.*;
public class initial
{
public static void main (String []args)
{
Scanner sc=new Scanner (System.in);
System.out.println("Enter the name");
String st=" "+sc.nextLine();
String st1="";
int a;
char ch;
st1=""+st.charAt(0);
a=st.lastIndexOf(' ');
String st2=st.substring(0,a-1);
for(int i=0;i<a-2;i++)
{
ch=st2.charAt(i);
if(ch==' ')
st1=st1+st2.charAt(i+1)+'.';
}
st1=st1.substring(1);
System.out.println(st1);
System.out.println(st.substring(a+1));
st1=st1+st.substring(a+1);
System.out.println(st1);
}
}
please refer my mail:
bandyosayam@gmail.com
PURPOSE OF PROJECT: promote the language of java and also to motivate the youths towards the ultimate logical sense
VERSION or DATE: Saturday, November 01, 2014,
HOW TO START THIS PROJECT: clicking
AUTHORS: one and only SB_!(@
USER INSTRUCTIONS: just get adddicted!@@ it has lots of patterns and riddles to solve
just do it men!!!.hang out with java in facebook ,twitter , whats Ap,and gmail toooo
just solve the logic in ur mind u'll do it
a unique program in java
AIM: to print initials of a name
import java.util.*;
public class initial
{
public static void main (String []args)
{
Scanner sc=new Scanner (System.in);
System.out.println("Enter the name");
String st=" "+sc.nextLine();
String st1="";
int a;
char ch;
st1=""+st.charAt(0);
a=st.lastIndexOf(' ');
String st2=st.substring(0,a-1);
for(int i=0;i<a-2;i++)
{
ch=st2.charAt(i);
if(ch==' ')
st1=st1+st2.charAt(i+1)+'.';
}
st1=st1.substring(1);
System.out.println(st1);
System.out.println(st.substring(a+1));
st1=st1+st.substring(a+1);
System.out.println(st1);
}
}
please refer my mail:
bandyosayam@gmail.com
No comments:
Post a Comment