roznica proc.cpp
资源名称:percdiff.zip [点击查看]
上传用户:jimmyou007
上传日期:2022-02-20
资源大小:2k
文件大小:0k
源码类别:
控制台编程
开发平台:
C/C++
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main()
- {
- float x,y,z;
- cout << "---------------- Made by Mleczko ----------------" << endl <<endl;
- cout << "podaj pierwsza wartosc (x): ";
- cin >> x;
- cout << endl << "podaj druga wartosc (y): ";
- cin >> y;
- z=((y-x)/(x))*100;
- cout << endl << endl << "roznica procentowa miedzy x i y wynosi: " << z << " %"<< endl << endl << endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }