我们被要求在下面做一个功能。我需要帮助 [英] We were asked to make a function below. I need help please

查看:61
本文介绍了我们被要求在下面做一个功能。我需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

float toFloat(char st []) - 返回st的浮点数。假设st是浮点值的有效字符串表示形式。我们被要求在不使用c中的内置函数且没有指针的情况下创建该函数。请帮助

float toFloat(char st[]) - returns the float equivalent of st. Assume that st is a valid string representation of a float value. We were asked to make that function without using built-in functions in c and also without pointers. please help

推荐答案

您可以在字符串字符的单次迭代中执行此操作,它只是一个乘法和添加作业。
You can do that in a single iteration over the string characters, it's just a multiply and add job.


这篇关于我们被要求在下面做一个功能。我需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆