Skip to content

Commit

Permalink
refactor kotlin files
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPLopes committed Dec 11, 2022
1 parent 6bf9b73 commit 3cfa4bb
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 3 deletions.
3 changes: 3 additions & 0 deletions KOTLIN/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
out
KOTLIN.iml
16 changes: 16 additions & 0 deletions KOTLIN/main/Main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import java.util.*;

fun main(args:Array<String>){
val sc = Scanner(System.`in`)

val a :String = sc.next()
val b :String = sc.next()

println("X = %d".format( soma(a.toInt(),b.toInt())))
}

fun soma(a:Int, b:Int):Int{
return a + b
}
1 change: 1 addition & 0 deletions KOTLIN/1001.kt → KOTLIN/main/ex1001/1001.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1001
import java.util.*;

fun main(args:Array<String>){
Expand Down
2 changes: 2 additions & 0 deletions KOTLIN/1002.kt → KOTLIN/main/ex1002/1002.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package main.ex1002

import java.util.*

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1003.kt → KOTLIN/main/ex1003/1003.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1003
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1004.kt → KOTLIN/main/ex1004/1004.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1004
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1005.kt → KOTLIN/main/ex1005/1005.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1005
import java.util.Scanner

data class Media(val a: Double, val b: Double)
Expand Down
2 changes: 2 additions & 0 deletions KOTLIN/1006.kt → KOTLIN/main/ex1006/1006.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package main.ex1006

import java.util.Scanner
class Peso
{
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1007.kt → KOTLIN/main/ex1007/1007.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1007
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1008.kt → KOTLIN/main/ex1008/1008.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1008
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1009.kt → KOTLIN/main/ex1009/1009.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1009
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
2 changes: 1 addition & 1 deletion KOTLIN/1010.kt → KOTLIN/main/ex1010/1010.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

package main.ex1010
fun main(args:Array<String>){
val (a ,b ,c) = readLine()!!.split(" ")
val (d, e, f) = readLine()!!.split(" ")
Expand Down
2 changes: 1 addition & 1 deletion KOTLIN/1011.kt → KOTLIN/main/ex1011/1011.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

package main.ex1011
import java.util.Scanner
import java.lang.Math

Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1012.kt → KOTLIN/main/ex1012/1012.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1012
import java.util.Scanner
import java.lang.Math

Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1013.kt → KOTLIN/main/ex1013/1013.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1013
import java.lang.Math

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1014.kt → KOTLIN/main/ex1014/1014.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1014
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1015.kt → KOTLIN/main/ex1015/1015.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1015
import java.lang.Math

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1016.kt → KOTLIN/main/ex1016/1016.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1016
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1017.kt → KOTLIN/main/ex1017/1017.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1017
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
1 change: 1 addition & 0 deletions KOTLIN/1069.kt → KOTLIN/main/ex1069/1069.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package main.ex1069
import java.util.Scanner

fun main(args:Array<String>){
Expand Down
2 changes: 1 addition & 1 deletion KOTLIN/1387.kt → KOTLIN/main/ex1387/1387.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

package main.ex1387
fun main(args:Array<String>){

while(true){
Expand Down

0 comments on commit 3cfa4bb

Please sign in to comment.