nagaras@ltsp-amd64-bravo:~$ cd Desktop
nagaras@ltsp-amd64-bravo:~/Desktop$ grep calc Coffee
double calc_ans = Calc(int_1,int_2);
System.out.printf("The answer is %.2f" , calc_ans);
nagaras@ltsp-amd64-bravo:~/Desktop$
nagaras@ltsp-amd64-bravo:~/Desktop$ grep calc Coffee
double calc_ans = Calc(int_1,int_2);
System.out.printf("The answer is %.2f" , calc_ans);
nagaras@ltsp-amd64-bravo:~/Desktop$
nagaras@ltsp-amd64-bravo:~$ cd Desktop
nagaras@ltsp-amd64-bravo:~/Desktop$ grep calc Coffee
double calc_ans = Calc(int_1,int_2);
System.out.printf("The answer is %.2f" , calc_ans);
nagaras@ltsp-amd64-bravo:~/Desktop$ diff Coffee Apple
1,81d0
< /**@directives
< *
< */
< import java.util.Scanner;
< /**
< * @author thileban
< * Lab1 Sep27 2018
< *
< */
< public class LAb_1 {
< /**
< *method CAlc defination
< * @param x input
< * @param y input
< * @return type double
< */
< public static double Calc(int x, int y)
< {
< return ((Math.sqrt(Math.PI*y*y))/(2*x));
<
< }
<
< /**
< * method wordCap
< * @param temp input
< * @return string type
< */
< public static String wordCap(String temp)
< {
< String str1,str2;
< str1 = temp.substring(0,1);
< str2 = temp.substring(1, temp.length());
< return str1.toUpperCase() + str2.toLowerCase();
< }
<
< /**
< * method findKeyWord
< * @param tempstr input
< * @param kw input
< * @return boolean type
< */
< public static boolean findKeyWord(String tempstr, String kw)
< {
< return tempstr.contains(kw);
< }
<
< /**
< * main method
< * user data input and call for functions
< * @param args
< */
< public static void main(String[] args) {
< Scanner scan = new Scanner(System.in);
<
< System.out.println("Enter Integer One");
< int int_1 = scan.nextInt();
<
< System.out.println("Enter Integer Two");
< int int_2 = scan.nextInt();
<
< double calc_ans = Calc(int_1,int_2);
<
< System.out.printf("The answer is %.2f" , calc_ans);
<
< System.out.println("\n Enter String s");
< String inp_string_1 = scan.next();
<
< System.out.println("Corrected String is " + wordCap(inp_string_1));
< Scanner scan2 = new Scanner(System.in);
<
< System.out.println("Enter String str\n");
< String inp_string_2 = scan2.nextLine();
<
< System.out.println("Enter String kw\n");
< String inp_string_kw = scan2.next();
<
< System.out.println("Is kw in str? = " + findKeyWord(inp_string_2,inp_string_kw));
<
< }
<
< }
nagaras@ltsp-amd64-bravo:~/Desktop$
nagaras@ltsp-amd64-bravo:~/Desktop$ passwd
(current) LDAP Password:
passwd: Authentication token manipulation error
passwd: password unchanged
nagaras@ltsp-amd64-bravo:~/Desktop$
nagaras@ltsp-amd64-bravo:~/Desktop$ NAME=Thileban
nagaras@ltsp-amd64-bravo:~/Desktop$ echo hey now
hey now
nagaras@ltsp-amd64-bravo:~/Desktop$ echo $NAME
Thileban
nagaras@ltsp-amd64-bravo:~/Desktop$ echo My name is $NAME
My name is Thileban
nagaras@ltsp-amd64-bravo:~/Desktop$
info echo
cntrl c
up down arrow
Comments
Post a Comment