+ 1

Can someone help me to make this executable

pragma solidity ^0.4.21 < 0.6.12; contract ReportCard{ string public name; uint public rollno ; string public batch; int public mark1; int public mark2; int public mark3; int public mark4; int sum=(mark1+mark2+mark3+mark4); int result=(sum/400)*100; string status; if(result>=35){ status="Pass"; } else{ status="Fail"; } function ReportCard(string newName,uint newRollno, string newBatch, int newMark1, int newMark2, int newMark3, int newMark4) public{ name=newName; rollno=newRollno; batch=newBatch; mark1=newMark1; mark2=newMark2; mark3=newMark3; mark4= newMark4; } function getReportCardDetails() public view returns(string,uint,string,int,int,int,int){ return(name,rollno,batch,mark1,mark2,mark3,mark4); } }

28th Jul 2020, 7:55 AM
Sevda Krithika Sharma
Sevda Krithika Sharma - avatar
9 odpowiedzi
+ 2
Ipang so do I.. 😅😅 I heard about this language with one of my friends..
28th Jul 2020, 8:13 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Ipang it is solidity used mainly for Ethereum
28th Jul 2020, 8:09 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Sevda Krithika Sharma we don't have code section for solidity here on sololearn
28th Jul 2020, 8:10 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Sevda Krithika Sharma always use functions to create logic.. And whenever you divide and multiply at the same time, then first apply multiplication and then division, since floating point is not yet supported by core Solidity, use constructor() to create constructor instead of using contract name and function keyword copy the code from textarea.. and run the code on Ethereum platform.. and pass the data from memory https://code.sololearn.com/WrLfh5tCE8OY/?ref=app
28th Jul 2020, 9:58 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Мг. Кнап🌠 okay,Thanks!
28th Jul 2020, 4:09 PM
Sevda Krithika Sharma
Sevda Krithika Sharma - avatar
0
Мг. Кнап🌠 we can code on remix.ethereum.org
28th Jul 2020, 8:25 AM
Sevda Krithika Sharma
Sevda Krithika Sharma - avatar
28th Jul 2020, 11:02 AM
Sevda Krithika Sharma
Sevda Krithika Sharma - avatar
- 2
Hmm
28th Jul 2020, 5:07 PM
Md Robin
Md Robin - avatar
- 2
Hmm
28th Jul 2020, 5:07 PM
Md Robin
Md Robin - avatar