CodeGym
Promotion
CodeGym University
Learning
Course
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Start learning now
  • All questions
serhad erol
Level 4
Bursa
  • 23.04.2019
  • 899views
  • 2comments

The code works says there is a typo but none whatsoever.

Question about the task Predictions
Java Syntax,  Level 3,  Lesson 8
Under discussion

Use the keyboard to separately enter the name, number1, and number2.
Display the following phrase:
<name> will receive <number1> in <number2> years.

Here's an example:
Nick will receive 10000 in 5 years.

Requirements:
  • The program should output text.
  • The program must read data from the keyboard.
  • The displayed text must contain the entered name.
  • The displayed text must contain the entered number1.
  • The displayed text must contain the entered number2.
  • The displayed text must fully match the task conditions.
package com.codegym.task.task03.task0319; /* Predictions */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String name = reader.readLine(); String num1 = reader.readLine(); String num2 = reader.readLine(); System.out.println(name + " will recieve " + num1 + " in " + num2 + " years."); } }
0
Comments (2)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Jesús de Llera
Level 23 , Badajoz, Spain
24 April 2019, 09:11
typo: "receive", not "recieve".
0
Mareike Frontend Developer
23 April 2019, 13:17
Hey, pay attention to "ie" / "ei" ;)
0
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Game Projects
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning and Java developer’s career.
Follow us
Interface language
Programmers Are Made, Not Born © 2023 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2023 CodeGym
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.