Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Java/Program-16/CSAOfCylinder.class
Binary file not shown.
14 changes: 14 additions & 0 deletions Java/Program-16/CSAOfCylinder.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.dsa;

import java.util.Scanner;

public class CSAOfCylinder {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("Enter radius and height of cylinder");
float radius=input.nextFloat();
float height=input.nextFloat();
float CSA=2*3.14f*radius*height;
System.out.println("Curved surface area of cylinder is "+CSA+" square units");
}
}
3 changes: 3 additions & 0 deletions Java/Program-16/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Program 16

Program to find CSA of Cylinder
17 changes: 17 additions & 0 deletions Java/Program-17/ReverseString.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.dsa;

import java.util.Scanner;

public class ReverseString {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
String reversed_string="";
System.out.println("Enter the string");
String string= input.next();
for(int i=string.length()-1;i>=0;i--){
reversed_string = reversed_string + string.charAt(i);
}
System.out.println("The original string is "+string);
System.out.println("The reversed string is "+reversed_string);
}
}
3 changes: 3 additions & 0 deletions Java/Program-17/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Program 17

Program to reverse a given string
7 changes: 7 additions & 0 deletions Java/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-11/Program.java) | Program for compound interest
| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-12/Program-12.java) | Print number of vowels and consonants in a string
| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-13/Program%20Number%20to%20Word.java) | Program to convert number into words
| [Program-14](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-14/Program%20Number%20to%20Word.java) | Program to convert decimal to binary
| [Program-15](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-15/Program%20Number%20to%20Word.java) | Program to convert decimal number to equivalenr binary number
| [Program-16](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-16/Program%20Number%20to%20Word.java) | Program to find CSA of cylinder
| [Program-17](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-17/Program%20Number%20to%20Word.java) | Program to reverse a given string
| [Program-18](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-18/Program%20Number%20to%20Word.java) | Program to calculate electricity bill
| [Program-19](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-19/Program%20Number%20to%20Word.java) | Program to calculate discount
| [Program-20](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-20/Program%20Number%20to%20Word.java) | Program to calculate batting average

</div>

Expand Down