Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

bulb states pattern

bulb states pattern program contain input is a single line containing a positive integer n representing the number of rooms in the building and the output should contain n lines , each line containing the state of the bulb in the room numbered from 1 to n in the form of 0 and 1.

example:

input 1 :- 5

output 1 :-

0 1 0 1 0

0 1 0 1 0

0 1 0 1 0

0 1 0 1 0

0 1 0 1 0



String Concatenation

string concatenation program contains first line of input contains the string a, second line of input contains the string b, third line of input contains the string c and fourth line of input contains the string t

for example, we have input 1:- a=mari , b=to, c=zzo, and t=1321.

concatenate these in the order a+c+b+a and print the resulting string: marizzotomari as the output 1.

input 2 :- a= nano, b=of, c=rano, and t= 2131

output 2 :-ofnanoranonano


Create a class called Student, with the following attributes/variables:


a. studentName (String)


b. studentNumber (int)s


c. regYear(long)


d. faculty(String)


e. department(String)

Create a class called Rational for performing arithmetic with fractions. Write a program to test your

class. Use integer variables to represent the private instance variables of the class—the numerator and

the denominator. Provide a constructor that enables an object of this class to be initialized when it’s

declared.


Write a program to take a String as input then display the words in one column, its length in another column, replace the first with last character of each word in third column.

Enter a String

a is the first vowel

a 1 a

is 2 si

the 3 eht

first 5 tirsf

vowel 5 lowev

Hint: Use length(),charAt(), indexOf(), substring() if required.

Array & split & ternary(:?) are not to be used


How to get smallest number in columns using 2d array.

And my task is to get smallest number in first column only.


i need assistance with this question on this link:

https://drive.google.com/file/d/1kWwKJJqmG4iihg5pYOfF8H0W8eCvZRi7/view?usp=sharing


so far i have done the following, and don't know where to go anymore, the following is a cpp file of what i have done so far:

https://drive.google.com/file/d/1CTwjUsu6JIsnLmdE0YYJE4LH-HGIEsXs/view?usp=sharing


program to print the diamond using 2*n-1 rows 

input:5

outpu:
. . . . 0 . . . . 
. . . 0 0 0 . . . 
. . 0 0 0 0 0 . . 
. 0 0 0 0 0 0 0 . 
0 0 0 0 0 0 0 0 0 
. 0 0 0 0 0 0 0 . 
. . 0 0 0 0 0 . . 
. . . 0 0 0 . . . 
. . . . 0 . . . .

i want the output should be like this. i did not got the desired output by using the code which you have sent.




Write a Python code of a program that asks the user to enter ten numbers and then display the total and the average of ONLY the odd numbers among those ten numbers.

[Please do not use list for this task]


==========================================================


Sample Input 1:

1


2


3


4


5


6


7


8


9


10


Sample Output 1: The total of the odd numbers is 25 and their average is 5.0


Explanation: The total is 1 + 3 + 5 + 7 + 9 = 25 and the average is 25/5 = 5.0


Ask the user to enter a Number, N

Display the summation of multiples of 7 up to that number (from 1 to N inclusive)


LATEST TUTORIALS
APPROVED BY CLIENTS