Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
odluke_z4.cpp
00001 #include <iostream> 00002 00003 using namespace std; 00004 00005 int main() 00006 { 00007 double a,b,c; 00008 char znak; 00009 cout <<"unesi 1. broj"<< endl; 00010 cin >>a; 00011 cout <<"unesi 2. broj"<< endl; 00012 cin >>b; 00013 00014 00015 00016 while (1){ 00017 cout <<"unesi matematicku operaciju"<< endl; 00018 cin >>znak; 00019 00020 if (znak == '+'){ 00021 c=a+b; 00022 cout <<"rezultat je: "<< c << endl; 00023 return 0; 00024 } else if (znak == '-'){ 00025 c=a-b; 00026 cout <<"rezultat je: "<< c << endl; 00027 return 0; 00028 } else if (znak == '*'){ 00029 c=a*b; 00030 cout <<"rezultat je: "<< c << endl; 00031 return 0; 00032 } else if (znak == '/'){ 00033 c=a/b; 00034 cout <<"rezultat je: "<< c << endl; 00035 return 0; 00036 } else { 00037 cout <<"error!!!"<< endl; 00038 } 00039 } 00040 }
Generated on Thu Jul 14 2022 21:05:48 by
1.7.2