A basic program

A basic program

Write a program that will print out the first 10 numbers, their squares and their cubes.

Write a program that displays the first 100 terms of the triangular sequence. This is the sequence that goes 1,3,6,10,15,21,... The rule is that you add on 2, then add on 3, then add on 4, etc.

Write a program that displays the first 20 powers of 2. Number and then the power.

The Fibbonacci sequence is obtained by adding together the two terms of a sequence to get the next term: 3 , 4 , 7 (because 3+4 = 7), 11, 18, etc. Write a program that allows you to input two numbers which are the starting values of a Fibonacci sequence and print out the first 20 terms.

Any of these would be helpful. Thank you in advance!

View Answers









Related Tutorials/Questions & Answers:
A basic program
A basic program  Write a program that will print out the first 10 numbers, their squares and their cubes. Write a program that displays the first... a program that displays the first 20 powers of 2. Number and then the power
basic program
basic program  hii actully i am goin for technical interview on java as fresher so please tell me what these two basic lines means : public static void main(String arg) and System.out.print(); please give me meaning of each
Advertisements
machine learning basic program
learning basic program Try to provide me good examples or tutorials links so that I can learn the topic "machine learning basic program". Also tell...machine learning basic program  Hi, I am beginner in Data Science
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........
code for a simple java program which performs basic arithmetic operation addition,subtraction,multiplication,division........  code for a simple java program which performs basic arithmetic operation addition,subtraction
basic
basic  thank you sir for your nice reply . ......sir my next que, if java program is modified,if the program is compiled & executed without saving it again,its previous execution takes place,why
basic html
basic html  what is the difference between html4 and html5
basic question
basic question  how we create a new table with the same structure and data of another table
Program
Program  Create a Super class Department(dno, dname, dlocation) and a method calsalary(float basic, float DA, float HRA).Define a subclass Employee(eno, ename, dno, dname, dlocation). Calulate the salary of an employee by using
Program
Program  Create a Super class Department(dno, dname, dlocation) and a method calsalary(float basic, float DA, float HRA).Define a subclass Employee(eno, ename, dno, dname, dlocation). Calulate the salary of an employee by using
basic doubts
basic doubts  can i write two beans within a same xml file..? Also can i write two xml files within a same package
program
program  any program of hotel or school management
program
program  program of jdbc using ms access for creating table
program
program  write a javascript program to create a application form with validation
program
program  write a html program in show table and this word in box
program
program  write a program different between to dates in terms of days in java
size of different basic data types
size of different basic data types   Write a simple program to find the size of different basic data types in java
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link:ADS_TO_REPLACE_1 Java Threads Thanks
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = â??Tommyâ?? age=â??23â?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  . Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  i want a progra in java to print a sentence in alphabetic order, taking the input from the user.the program should writen without using the array for example : if input= this is a cat then output sould = a cat
program
program  Utopias tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program calculateTax which determines the tax on the gross pay. Define
program
program  Write a JSP Program, which displays a web page containing two web links one for your profiling and other for the schedule of theory of practical classes of your Batch. When one click on link for getting your profile
program
program  Write a program to print details of a week for a particular day using array of objects Integer and String. OUTPUT: First Day of Week is Monday Second Day of Week is Tuesday Third Day of Week is Wednesday Forth Day
Java basic question...
Java basic question...   Design a Java Application project...), emp_desig as String (To hold designation of the employee) and basic as Integer (To hold the basic salary of the employee). (iii) Define and declare a method
basic function of computer system
basic function of computer system  What is the basic function of computer system
java basic
java basic  java program for finding LCM and HCF
ModuleNotFoundError: No module named 'cml-basic'
ModuleNotFoundError: No module named 'cml-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cml-basic' How to remove the ModuleNotFoundError: No module named 'cml
ModuleNotFoundError: No module named 'cml-basic'
ModuleNotFoundError: No module named 'cml-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cml-basic' How to remove the ModuleNotFoundError: No module named 'cml
ModuleNotFoundError: No module named 'cml-basic'
ModuleNotFoundError: No module named 'cml-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'cml-basic' How to remove the ModuleNotFoundError: No module named 'cml
ModuleNotFoundError: No module named 'modeldb-basic'
ModuleNotFoundError: No module named 'modeldb-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'modeldb-basic' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'PiRSClock-Basic'
ModuleNotFoundError: No module named 'PiRSClock-Basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'PiRSClock-Basic' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'prancer-basic'
ModuleNotFoundError: No module named 'prancer-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'prancer-basic' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'probe-basic'
ModuleNotFoundError: No module named 'probe-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'probe-basic' How to remove the ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'QCAT-Basic'
ModuleNotFoundError: No module named 'QCAT-Basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'QCAT-Basic' How to remove the ModuleNotFoundError: No module named 'QCAT
ModuleNotFoundError: No module named 'QCAT-Basic'
ModuleNotFoundError: No module named 'QCAT-Basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'QCAT-Basic' How to remove the ModuleNotFoundError: No module named 'QCAT
ModuleNotFoundError: No module named 'salesforce-basic'
ModuleNotFoundError: No module named 'salesforce-basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'salesforce-basic' How to remove the ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'stadistic_basic'
ModuleNotFoundError: No module named 'stadistic_basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'stadistic_basic' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'stadistic_basic'
ModuleNotFoundError: No module named 'stadistic_basic'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'stadistic_basic' How to remove the ModuleNotFoundError: No module named

Ads