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
pragma solidity ^0.4.25; | |
contract Ejemplo3{ | |
mapping(uint256 => Alumno) alumnos; | |
struct Alumno { | |
string nombre; | |
uint256 grupo; | |
} |
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
pragma solidity ^0.4.25; | |
contract Ejemplo3{ | |
mapping(uint256 => Alumno) alumnos; | |
struct Alumno { | |
string nombre; | |
uint256 grupo; | |
} |
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
pragma solidity ^0.4.25; | |
import "./ERC20.sol"; | |
contract Token is ERC20 { | |
mapping (address => uint256) balances; | |
mapping (address => mapping (address => uint256)) allowed; | |
uint256 public totalSupply; | |
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
pragma solidity ^0.4.25; | |
contract owned { | |
constructor() public { owner = msg.sender; } | |
address owner; | |
modifier onlyOwner { | |
require( | |
msg.sender == owner, | |
"Only owner can call this function." |
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
pragma solidity ^0.4.25; | |
contract Ejemplo1{ | |
uint256 notaFinal; | |
constructor(){} | |
function calcularNotaFinal(uint256 notaContenido, uint256 notaGrupal, uint256 notaIndividual) public{ | |
notaFinal = ((notaContenido*70) + (notaGrupal * 20) + (notaIndividual * 10))/100; |
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
pragma solidity ^0.4.25; | |
contract Ejemplo1{ | |
uint256 notaFinal; | |
constructor(){} | |
function calcularNotaFinal(uint256 notaContenido, uint256 notaGrupal, uint256 notaIndividual) public{ | |
notaFinal = ((notaContenido*70) + (notaGrupal * 20) + (notaIndividual * 10))/100; |