This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="16dp"> | |
<TextView | |
android:text="I’m in this corner" | |
android:layout_height="wrap_content" | |
android:layout_width="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class SumOfN { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
int N = s.nextInt(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class NumbersInRange { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
// Get L and R from the input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class AddTwoArrays { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
// Reading integer from input | |
int N = s.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the input for the two variables | |
num1, num2 = map(int, input().split()) | |
sum_integer = 0 | |
# logic to add these numbers here: | |
sum_integer=num1+num2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numArray = map(int, input().split()) # Get the input | |
sum_integer = 0 | |
# write your logic to add these 4 numbers here | |
for i in numArray: | |
sum_integer +=i | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = input() | |
# Get the input | |
numArray = map(int, input().split()) | |
sum_integer = 0 | |
# Write the logic to add these numbers here | |
for i in numArray: | |
sum_integer +=i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = input() | |
# Get the input | |
numArray = map(int, input().split()) | |
sum_integer = 0 | |
# Write the logic to add these numbers here | |
for i in numArray: | |
sum_integer += i**2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get L and R from the input | |
L, R = map(int, input().split()) | |
# the logic to print all integers between L and R | |
for i in range(L,R+1): | |
print(i, end=" ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = int(input()) | |
# Get the array | |
numArray1 = list(map(int, input().split())) | |
numArray2 = list(map(int, input().split())) | |
sumArray = [] | |
# the logic | |
for i in range(N): |
OlderNewer