Skip to content

Commit 18f8946

Browse files
Create Readme.md
1 parent be333d6 commit 18f8946

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

1 - Data Types/Readme.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# [2nd problem in the 30-Days-of-Code-Hackerrank Challenge](https://www.hackerrank.com/challenges/30-data-types/problem?isFullScreen=true)
2+
## This repository contains the codes, I have been submitting in the 30 Days of Code program by Hackerrank.
3+
4+
## Objective
5+
In this challenge, we review some basic concepts that will get you started with this series. You will need to use the same (or similar) syntax to read input and write output in challenges throughout HackerRank.
6+
7+
## Task
8+
Complete the code in the editor below. The variables i, d, and s are already declared and initialized for you. You must:
9+
10+
1. Declare 3 variables: one of type int, one of type double, and one of type String.
11+
2. Read 3 lines of input from stdin (according to the sequence given in the Input Format section below) and initialize your 3 variables.
12+
3. Use the + operator to perform the following operations:
13+
- Print the sum of i plus your int variable on a new line.
14+
- Print the sum of d plus your double variable to a scale of one decimal place on a new line.
15+
- Concatenate s with the string you read as input and print the result on a new line.
16+
17+
18+
Note: If you are using a language that doesn't support using for string concatenation (e.g.: C), you can just print one variable immediately following the other on the same line. The string provided in your editor must be printed first, immediately followed by the string you read as input.
19+
Note: The instructions are Java-based, but we support submissions in many popular languages. You can switch languages using the drop-down menu above your editor, and the variable may be written differently depending on the best-practice conventions of your submission language.
20+
21+
The problem should follow the following format:
22+
<img src="https://github.com/AdityaSeth777/30-Days-of-Code-Hackerrank/blob/main/0%20-%20Hello%2C%20World/0%20day.png">
23+
24+
## Explanation
25+
When we sum the integers 4 and 12, we get the integer 16.
26+
When we sum the floating-point numbers 4.0 and 4.0, we get 8.0.
27+
When we concatenate ```HackerRank``` with ```is the best place to learn and practice coding!```, we get ```HackerRank is the best place to learn and practice coding!```.
28+
29+
You will not pass this challenge if you attempt to assign the Sample Case values to your variables instead of following the instructions above and reading input from stdin.
30+
31+
## Logic
32+
It will be updated after uploading all the required details in all the questions in the repo.
33+
34+
## FAQ
35+
- How to stop the script? Ctrl+C (control+C for Mac)
36+
- For any other problems, feel free to raise an issue.
37+
38+
## Contributing
39+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
40+
41+
Please make sure to update tests as appropriate.
42+
43+
## License
44+
[MIT License © Aditya Seth](https://github.com/AdityaSeth777/30-Days-of-Code-Hackerrank/blob/main/License)
45+
46+
## What next ?
47+
- I will be working on completing this wonderful bunch of programs by Hackerrank, which I will be uploading as well.
48+
- Along with that, I will be uploading other programs as well including my college assignments and other projects.
49+
50+
## Where to contact ?
51+
52+
53+
## 🙋‍♂️ Support
54+
55+
💙 If you like this project, give it a ⭐ and share it with friends!<br><br>
56+
[☕ Buy me a coffee](https://www.buymeacoffee.com/adityaseth)
57+
58+
---
59+
60+
Made with ❤️ and C, C++, Python, Ruby, and Kotlin. <br><br>

0 commit comments

Comments
 (0)