0
Write a program to take monthly salary as input, and calculate and output the annual income. Sample Input 800 Sample Outp
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int salary = Convert.ToInt32(Console.ReadLine()); //your code goes here Console.WriteLine(salary); } } } Where is the wrong anyone help me in this Excepted Output salary is 9600
7 Answers
+ 7
Input is monthly salary.
Output should be annual income!
+ 3
Please post sample output too
+ 3
You only output the monthly salary as inputted. The task description asks to output the annual salary
+ 2
As mentioned by Martin Taylor annual means yearly. Isn't it?
+ 2
Sudhakar Gorantla Do the math in the Console.WriteLine(do math here... monthly salary times the number of months in a year). If you want help, you must try.
+ 1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int salary = Convert.ToInt32(Console.ReadLine());
//your code goes here
int annualSalary = 12;
Console.WriteLine(salary *= annualSalary);
}
}
}
- 6
Code for the question