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

Write a program to print W pattern of N lines using a asterisk(*) character


NOTE : There is a space after each asterisk (*) character.



Input:


The first line is an integer N



Explanation:


For N=5


The output should be


* * * * * * * * *


* * * * * * * *


* * * * * *


* * * *


* *

First, read in an input value for variable numInput. Then, read numInput integers from input and output each integer on a newline after the string "input = ". 

Ex: If the input is 2 30 40, the output is:

input = 30
input = 40

1. A prime number is an integer greater than one and divisible only by itself and one.

The first seven prime numbers are 2, 3, 5, 7, 11, 13, and 17. Write a program that displays all the

prime numbers between 1 and 100

2. Write another program that accepts a number from the user and returns th Fibonacci value of that

number. You should use recursion in here.

3. Write a program that accepts a number and determine whether the number is prime or not.

4. Write a C++ code that computes the sum of the following series.

Sum = 1! + 2! + 3! + 4! + …n!

The program should accept the number from the user.

5. Write a C++ code to display only even numbers found between 222 and 180.

6. Write and run a program that reads a positive integer n and then prints a diamond of numbers Use for loop.  


program to print the first prime numbers in the given input


Sample Input 2

4

2

3

5

7

Sample Output 2

2


Sample Input 1

5

1

10

4

3

2

Sample Output 1

3



can i get coode for this the above code is not working for both cases



program name: String lookup

input: plays

3

Raju is going to school

Teja plays cricket

car has four wheels


output: 2


Enter integer here: 5

. . . . 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 . . . .


can i get code for this please,

using for loop


Given two numbers X and Y, create a program that determines the difference between X and Y using if-else. If X - Y is negative, compute R = X + Y; if X - Y is zero, compute R = 2X + 2Y; and if X - Y is positive, compute R = X * Y. Print the values of X, Y, and R.


An e‐commerce company is planning to start a new automated order I'd generator system fo book orders. For this purpose a random steing consisting of only digits is only fed to the system. From this random number, the order I'd is generated as a string which is a concatenation of sum of digits at extreme left and extreme right position, then the sum of digits at second left and second last right position and so on,until there is no digit left for consideration. Where there is a single digit then add zero to it .write an algorithm to find the order I'd for the book order

write a python function that accepts the value of two integers a and b and produces the output as (a+b)/(a-b). As he is still a kid, hence might not be able to enter the values correctly. Write a python function Divide_Op(a,b) (Refer RollNo_W10A_3.py) which produces the appropriate output or error message by handling all possible exceptions.

writing a python function Add_Values(a,b) (Refer RollNo_W10A_2.py)which takes either two integer or float or string input parameters and perform addition/concatenation if the type of both parameters is the same otherwise give an exception as shown in the example.

LATEST TUTORIALS
APPROVED BY CLIENTS