+ 1

Can anyone teach me that how to write a function?

6th Feb 2017, 5:17 PM
Neha ken
Neha ken - avatar
4 Answers
+ 7
specify the data type of your function, give a space and write the name of your function with () attached to it. You will then add curly braces for the function body. Use void if the function has no return type. eg If your function name is myFunc with integer data type then below is how you can declare it int myFunc(){ //your code goes here }
6th Feb 2017, 5:28 PM
Baba Yunus Abdul Yekin
Baba Yunus Abdul Yekin - avatar
+ 1
Just take the course in this app. It teaches you how to write a general function.
6th Feb 2017, 5:25 PM
xyz xyz
xyz xyz - avatar
0
Yeah what xyz said
6th Feb 2017, 5:36 PM
Unforgiven
Unforgiven - avatar
0
1st u have to declare a function and then u have to write the function in a unique portion.. at last you have to call the function in your main function
6th Mar 2018, 3:08 AM
Nirzar
Nirzar - avatar