Answer:
Here is the python code:
StartingSal = int(input("Enter the starting salary: "))
AnnualIncrease = (int(input("Enter the annual % increase: ")) / 100)
Years = int(input("Enter the number of years: "))
for count in range(1,Years+1):
print("Year ", count, " Salary: ", StartingSal*((1+AnnualIncrease)**(count-1)))
Explanation:
This program prompts the user to enter starting salary, percentage increase in salary per year and number of years.
The for loop has range function which is used to specify how many times the salaries are going to be calculated for the number of years entered. It starts from 1 and ends after Years+1 means one value more than the year to display 10 too when user inputs 10 days.
The year and corresponding salary is displayed in output. At every iteration the starting salary is multiplied by annual percentage increase input by user. Here count is used to count the number of salaries per year, count-1 means it will start from 30000.
Answer:
string() Its a derived data type
.. and you can modify strings
Answer:
# include <iostream>
#include<stdio.h>
using namespace std;
bool IsLeapYear(int y)
int main()
{
int y;
cout<<"Enter the Year to check Leap or Not"<<endl;
cin>>y;
IsLeapYear(int y);
getch();
}
bool IsLeapYear(int y)
{
if (y%4==0)
{
if (y%100==0)
{
if (y%400==0 )
{
cout<"The year is leap Year";
}
else
{
cout<<" The year is not Leap Year";
}
}
else
{
cout<<"The year is Leap Year" ;
}
}
else
{
cout<<"The year is not Leap Year";
}
}
Explanation:
In this program a function has been defined named as IfLeapYear, to check that whether the entered year is leap year or not. An year taken as integer data type named as y to enter the year to check. If the year is divisible by 4 but not divisible by 100 is the leap year. If the year is divisible by 4, divisible by 100 and also divisible by 400 is the century year and is also the leap year.
To check all the statements, Nested if-else conditions has been used to check multiple requirements of the leap year.
Go here this should help bunches!
http://www.microsoft.com/security/online-privacy/safely-dispose-computers-and-devices.aspx
Hope this website helps!