Write a shell program. Enter number of days from keyboard.
Find out the number of years, month and days it contains
Answer / Avadhesh Kumar
```bashn#!/bin/bashnnecho "Enter number of days:"nread daysnnyears=$(($days/365))ndays_remaining=$days$(($days%365))nmonths=$(($days_remaining/30))ndays_remaining=$(($days_remaining%30))necho "Number of years: $years"necho "Number of months: $months"necho "Number of remaining days: $days_remaining"n```
| Is This Answer Correct ? | 0 Yes | 0 No |
why we use static with only main()class not with other class
what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?
cobol is execution r not without jcl
what are methods we have in connection pooling
can we allocate memory for interface? if no then why?
what is the difference between set and append?
what is class module in vb6? what it's use? with example..
how do we provide security for web services
< No Frames > tag is used for
5.Call by value and Call by reference with program?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box. eg: 3 box contain stick as:1,1,1. if u take 1 stick from 3rd numbred box you will any how win the match.
What is the Super Class of Exception in java?
11 Answers Andesa Services, Benchmark, CitiGroup, CMC, Evergent, KOT Systems, Value Labs, Vijay infoart Solutions,