New course! Every coder should learn Generative AI!
Try a free lesson+ 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); } }
9 Answers
+ 2
Ipang so do I.. 😅😅 I heard about this language with one of my friends..
+ 1
Ipang it is solidity used mainly for Ethereum
+ 1
Sevda Krithika Sharma we don't have code section for solidity here on sololearn
+ 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
+ 1
Мг. Кнап🌠 okay,Thanks!
0
Мг. Кнап🌠 we can code on remix.ethereum.org
0
Мг. Кнап🌠 Thanks
- 2
Hmm
- 2
Hmm