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

13th Sep 2021, 11:48 AM
Sudhakar Gorantla
Sudhakar Gorantla - avatar
7 Answers
+ 7
Input is monthly salary. Output should be annual income!
13th Sep 2021, 11:54 AM
Coding Cat
Coding Cat - avatar
+ 3
Please post sample output too
13th Sep 2021, 11:50 AM
Atul [Inactive]
+ 3
You only output the monthly salary as inputted. The task description asks to output the annual salary
13th Sep 2021, 11:54 AM
Lisa
Lisa - avatar
+ 2
As mentioned by Martin Taylor annual means yearly. Isn't it?
13th Sep 2021, 12:37 PM
Atul [Inactive]
+ 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.
13th Sep 2021, 12:55 PM
Paul K Sadler
Paul K Sadler - avatar
+ 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); } } }
23rd Jun 2022, 12:43 PM
ilham niya
ilham niya - avatar
- 6
Code for the question
13th Sep 2021, 12:40 PM
Sudhakar Gorantla
Sudhakar Gorantla - avatar