+ 1
Plz check it is true reply me its a program on salary if grade is above on 15. Bonus 50% on salary wil also provide if
#include <iostream> using namespace std; int main() { float salary, bonus; int grade; cin>>salary; cin>>grade; if (grade>15) bonus =salary*50/100; else bonus =salary*50/100; int tsalary =bonus+salary; cout <<"salary in Rs.">>tsalary; return 0; }
5 Respuestas
+ 2
1.declare tsalary first then use it
2.in last cout use this symbol << insted of >> this symbol
and here if your condition is true then you provide 50% bonus but in else also you provide same bonus so provide 50% only once and
3.you required to use simple if instead of if else
+ 1
Thanks bro
+ 1
Thanks again bro my program has completed i run it..its ok now
0
nice
0
where are you from sir? ?