import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double gbpAmount; int userChoice; System.out.println("Welcome to the currency converter. Please enter the value in £GBP"); gbpAmount = scanner.nextDouble(); System.out.println("Press 1 for US dollars Press 2 for Euros Press 3 for Yen"); userChoice = scanner.nextInt(); switch (userChoice) { case 1 -> { double dollars = (gbpAmount * 1.25); System.out.print("The amount in Dollars is $"+(dollars)); } case 2 -> { double euros = (gbpAmount * 1.17); System.out.print("The amount in Euros is €"+(euros)); } case 3 -> { double yen = (gbpAmount * 184.44); System.out.print("The amount in Yen is €"+(yen)); } default -> { System.out.println("Error detected. Please enter 1, 2 or 3"); } } } }
import java.util.Scanner; // imports the scanner public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // initialise the scanner int station; // store required times table station int counter = 0; // variable used to count up - start at 0 System.out.println("Welcome to the times table program. Please enter required times table"); station = scanner.nextInt(); // store the user input // loop while (counter <= 12){ // stop before counter reaches 13 System.out.println(counter + " times " + station + " is " + (counter * station)); counter = counter + 1; } System.out.println("Times table complete"); // confirm times table is complete } }
public class Main { public static void main(String[] args) { // count up using a while loop int number; // declaring number variable number = 0; // setting the number initially at 0 while (number <= 10){ // condition - keep repeating as long as number is less than or equal to 10 System.out.println("The number is " + number); // print out what the number currently number = number + 1; // add 1 on to the number } System.out.println("The loop is done!"); } }
public class Main { public static void main(String[] args) { String name; double firstNum, secondNum, result; // declare variables int choice; Scanner scanner = new Scanner(System.in); // initialising the scanner System.out.println("Welcome to the calculator. Please enter your name"); name = scanner.next(); // store user's name System.out.println("Hello " + name + ", please get ready to enter your numbers!"); // display greeting System.out.println("Please enter your first number"); firstNum = scanner.nextDouble(); // store first number System.out.println("Please enter your second number"); secondNum = scanner.nextDouble(); // store second number System.out.println("Press 1 to add Press 2 to subtract Press 3 to divide Press 4 to multiply"); // display menu choice = scanner.nextInt(); // store user choice // add-up if (choice == 1){ result = (firstNum + secondNum); System.out.println("The result of your addition is " + result); } // subtract if (choice == 2){ result = (firstNum - secondNum); System.out.println("The result of your subtraction is " + result); } // divide if (choice == 3){ result = (firstNum / secondNum); System.out.println("The result of your divide is " + result); } // multiply if (choice == 4){ result = (firstNum * secondNum); System.out.println("The result of your multiplication is " + result); } } }
Here is the source code from this video. Enjoy! // Code listing... import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Please enter current air temperature"); int airTemperature = scanner.nextInt(); if (airTemperature < 16){ System.out.println("The heating is turned on"); } else { System.out.println("The heating is turned off"); } } }
Such a hard place to live, stormy, difficult to grow food, isolated. But life goes on. And the music runs through those of us whose ancestors left seeking gold, never to return!
I love this song for many reasons. The pictures are of a time now gone but which I still remember. A people gracious and generous. It also reminds us that we will indeed be returning home at the end of our journey here. And the singing is just lovely too.
Thank you for sharing this beautiful video :)I love Runrig and I appreciate & love the Scottish Gaelic culture even though I am not of the culture my heart understands it.It sends shivers down my spin listening to and enjoying all the songs and videos made of my beloved Alba and her magical Highlands.I carry her deep within my heart an she sits upon my right shoulder as a reminder every time I look in the mirror two thistle together with"alba gu brath" in memory of where I left half ma heart.xxx
àillidh ! tapadh leat for sharing this beautiful video and song by Runrig:)(tapadh leat Mo Choir Charaid Saul) I love and appreciate the Scottish Gaelic culture very much and wish very much for the ways of the old finds it ways back..It is important to move forward of course but at the same time one should never forget the way of the ancestors and many gone before us.Slàinte mhòr agus a h-uile beannachd duibh.ALBA GU BRATH!!! ♥♥♥
We have lost much by our high tech fast paced world. These people were very connected to God and nature and relyed on each other for strength and support. Somehting not evident in today's society.
Thanks for uploading this song and the video! Do you know of anymore videos on youtube that show how life used to be on the islands? I like seeing the older lady knitting socks, while I'm doing the same!
Hello, This video has actually got mostly photos of the nicer island next to Uist, Eriskay! and the man with the dog in the video is my uncle! Eriskay should get most of the credit for th beauty in this video.
As an American who's visited Skye, Uists, Harris/Lewis this brings back great memories. I remember the guy working at the ferry terminal in Uig, Skye telling me he'd never once visited Uist, no reason to, so he told me. Funny, in the US, I can drive for 11 hours and not be able to get out of one state.
Would have meant just as much without "As an American who's visited Skye, Uists, Harris/Lewis" RE "Funny, in the US, I can drive for 11 hours and not be able to get out of one state." There used to be a lot of these kind of cars in the Hihlands. They're better now :)