Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. contract Student{
  2. struct stu{
  3. string name;
  4. uint age;
  5. bool tookTest;
  6. }
  7. mapping(uint => stu) public studentNames;
  8. function addStudent (uint ID, string _name, uint _age) {
  9. studentNames[ID] = stu(_name, _age, false);
  10. }
  11. function updateStudent (uint ID) {
  12. studentNames[ID].tookTest = true;
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement