Firstly, why use a C-script for something so trivial? You can easily build this out of basic PLECS components.
Secondly, please review the PLECS Tutorials on C-Scripts. The "PLECS: Using the C-Script Block" tutorial should give you all the background needed to complete this task. Refer specifically to Section 4 of the exercise which shows how to implement a basic mathematical function. There also is a reference case in *.zip package you can download that is associated with the tutorial.