Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // zadanie_1_XIII.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- cout<<"S pomoshju cin/cout:\n";
- double a,b,z,y,razn;
- cout<<endl<<"Vvedite a i b:\n";
- cout<<">>";
- cin>>a>>b;
- y=(sin(a)+cos(2*b-a))/cos(a)-sin(2*b-a);
- z=(1+sin(2*b))/cos(2*b);
- razn=abs(y-z);
- cout<<"\nRaznost="<<razn<<endl;
- cout<<endl<<"S pomoshju scanf/printf:\n";
- printf("Vvedite a i b:\n");
- printf(">>");
- scanf("%f, %f", &a, &b);
- y=(sin(a)+cos(2*b-a))/cos(a)-sin(2*b-a);
- z=(1+sin(2*b))/cos(2*b);
- razn=abs(y-z);
- printf("\nRaznost=%f", razn);
- cout<<endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment