This file contains hidden or 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.Random; | |
| import java.util.Scanner; | |
| public class RockPaperScissors { | |
| public static void main(String[] args) { | |
| //Setting Up | |
| String[] options = new String[]{"Rock", "Paper", "Scissors"}; | |
| Scanner scanner = new Scanner(System.in); | |
| Random random = new Random(); |
This file contains hidden or 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
| // Cos code | |
| #include <iostream> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int x = 1; | |
| double result; |
This file contains hidden or 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
| // Sin code | |
| #include <iostream> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int x = -1; | |
| double result; |
This file contains hidden or 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
| // Tan code | |
| #include <iostream> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int x = 25; | |
| double result; |
This file contains hidden or 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
| class Main { | |
| public static void main(String args[]) { | |
| System.out.println("Hello, world!"); | |
| } | |
| } |
This file contains hidden or 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
| int main(){ | |
| /** MC socket **/ | |
| struct sockaddr_in groupSock; | |
| groupSock.sin_family = AF_INET; | |
| groupSock.sin_addr.s_addr = inet_addr("225.5.4.30"); | |
| groupSock.sin_port = htons(54321); | |
| bzero(&(groupSock.sin_zero),8); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <p>Click the button to get your coordinates.</p> | |
| <button onclick="getLocation()">Try It</button> | |
| <p id="demo"></p> |
This file contains hidden or 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
| section .text | |
| global _start ;must be declared for using gcc | |
| _start: ;tell linker entry point | |
| mov edx, len ;message length | |
| mov ecx, msg ;message to write | |
| mov ebx, 1 ;file descriptor (stdout) | |
| mov eax, 4 ;system call number (sys_write) | |
| int 0x80 ;call kernel | |
| mov eax, 1 ;system call number (sys_exit) | |
| int 0x80 ;call kernel |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| from random import randint | |
| #create a list of play options | |
| t = ["Rock", "Paper", "Scissors"] | |
| #assign a random play to the computer | |
| computer = t[randint(0,2)] | |
| #set player to False | |
| player = False |
NewerOlder