By: Jeffrey : 2012年03月16日
Description: This simple C++ program shows how to calculate total based on the given quantity and price.
By: Ignatius : 2012年03月16日
Description: This simple C++ program sorts the elements of an integer array and prints them.
By: Ignatius : 2012年03月16日
Description: This simple C++ program illustrates the use of three nested for loops. The program multiplies matrix x and y and stores the resulting matrix product xy in matrix z. Both x and y must be compatible for multiplication that means, the number of columns of x must be equal to the number of rows of y
By: Ignatius : 2012年03月16日
Description: This simple C++ program computes the square root of the sum of the squares of all the positive elements in array named x. It uses the header file math.h since it contains the mathematical functions pow() (for taking the power of a number) and sqrt() (for taking the square root of a number)
By: Ignatius : 2012年03月16日
Description: This simple C++ program illustrates the use of two-dimensional arrays. This program calculates the average of all the elements in the integer array named x. For this, the program uses two nested for loops. The outer loop with index i provides the row subscript. The nested for loops therefore accesses each element of the array and the inner loop with index j provides the column subscript.
By: Ignatius : 2012年03月16日
Description: This simple C++ program shows how to manipulate a two dimensional array. In this case it will traverse through the array and print its contents.
By: B. Lippman : 2011年03月18日
Description: To produce an executable file, we must tell the compiler not only where to find our main function but also where to find the definition of the member functions defined by the Sales_item class. Let's assume that we have two files: main.cc, which contains the definition of main, and Sales_item.cc, which contains the Sales_item member functions. We might compile these files as follows:
By: Stanley B. : 2011年03月12日
Description: Often we need to define a set of alternative values for some attribute. A file, for example, might be open in one of three states: input, output, and append. One way to keep track of these state values might be to associate a unique constant number with each. We might write the following:
By: Stanley B. : 2011年02月19日
Description: Two string literals (or two wide string literals) that appear adjacent to one another and separated only by spaces, tabs, or newlines are concatenated into a single new string literal. This usage makes it easy to write long literals across separate lines:
By: Stanley B. : 2011年02月19日
Description: Using the IO library, we can extend our main program to ask the user to give us two numbers and then print their sum:
© 2023 Java-samples.com
Tutorial Archive: Data Science React Native Android AJAX ASP.net C C++ C# Cocoa Cloud Computing EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Trends WebServices XML Office 365 Hibernate
Latest Tutorials on: Data Science React Native Android AJAX ASP.net C Cocoa C++ C# EJB Errors Java Certification Interview iPhone Javascript JSF JSP Java Beans J2ME JDBC Linux Mac OS X MySQL Perl PHP Python Ruby SAP VB.net EJB Struts Cloud Computing WebServices XML Office 365 Hibernate