My young friend

  • 2
  • Locked
In 3126, everyone knows about System.out.println() and uses it often. It's not just CodeGym students that begin to learn programming with this command. Even children do. Let's write a program that displays my friend's true birth year. He was born 8 years ago.
You can't complete this task, because you're not signed in.
Comments (85)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
zam
Level 2 , Philippines
23 May, 03:16
public class Solution { public static void main(String[] args) { int year = 3126; int ago = 8; System.out.println(year - ago); } }
Abrar Mirje
Level 1 , India
5 May, 05:54
int currentDays = 3126; int age = currentDays - 8; System.out.println(age);
PRIYANKA DEWARE
Level 2 , Delhi, India
13 April, 17:03
int a = 3126; int b = a - 8 ; System.out.println("my friends birth year."); System.out.println(b);
Khent E. Palermo
Level 1 , Philippines
19 March, 14:28
nice one guys for the tip
Nomophobic Girl
Level 2 , CodeGym University in India, India
11 March, 16:12
And the answer is... System.out.print("my friends birth year"); System.out.println(3118);
13 February, 11:17
int year=3126; int age=8; System.out.println(year-age);
kaeln023
Level 1 , Philippines
4 January, 13:28
System.out.println(3126-8);
A learner
Level 2 , Pakistan
4 April, 10:13
I dont know why but this is correct on the other hand they say that outputbin text and display my friend's birthday year
18 December 2022, 00:25
How come it doesn't work even after looking at the hint?
18 December 2022, 00:11
Where it says the program should output text, does it mean string?
A learner
Level 2 , Pakistan
4 April, 10:15
Yeah but it is wrong the outpit is only in int
Emma Afonso
Level 1 , United States
6 December 2022, 23:56
got it 2 try