Home >Backend Development >PHP Tutorial >3——The use of PHP simple operators, the use of php cache, the use of phpexcel, the use of php

3——The use of PHP simple operators, the use of php cache, the use of phpexcel, the use of php

WBOY
WBOYOriginal
2016-07-29 08:48:49930browse
*/
 * Copyright (c) 2016,烟台大学计算机与控制工程学院
 * All rights reserved.
 * 文件名:text.cpp
 * 作者:常轩
 * 微信公众号:Worldhello
 * 完成日期:2016年5月18日
 * 版本号:V1.0
 * 问题描述:PHP 运算符
 * 程序输入:无
 * 程序输出:无
 */
<?php 
$english = 110; //英语成绩
$math= 118; //数学成绩
$biological = 80; //生物成绩
$physical = 90; //物理成绩
$sum=$english+$math+$biological+$physical;
$avg=$sum/4;
$x=$math-$english;
$x2=$english*$english;


echo "总分:".$sum."<br />";
echo "平均分:".$avg."<br />";
echo "数学比英语高的分数:".$x."<br />";
echo "英语成绩的平方:".$x2."<br />";

The role of . in the program is the connector

Running result:

总分:398
平均分:99.5
数学比英语高的分数:8
英语成绩的平方:121

The above introduces 3 - the use of PHP simple operators, including PHP, usage content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn