answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

How is computer programming related to algebra?

Computer Programming is all about algebra. In algebra, you solve for variables like x and y in their simplest form, in programming, the variables can pass on values or accept values and give you the result.For eg:Find the area of a square with side 'a' units.In algebra: Area=a2.In Programming, the program can find the area by taking input from the user.float area,a;couta;area=a*a;cout


What is namespace in c plus plus program?

A namespace is similar to a class in object oriented programming. A namespace contains functions defined by the programmer. for example namespace std contains functions like cout and cin.namespaces can be globaly declared like so: "using namespace std;"which includes all the functions located in the namespace std.if you only need to use cout you can globaly declare only cout like this "using std::cout;"orstd::cout


Write an application that displays in the command window a box an oval an arrow and a diamond using asterisks as follows?

the code for the box is: # include <iostream> using namespace std; void main () { cout << "*********\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*********\n"; the code for the oval is: # include <iostream> using namespace std; void main () { cout << " ***\n"; cout <<" * *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<" * *\n"; cout << " ***\n"; the code for the arrow is: # include <iostream> using namespace std; void main () { cout << " * \n"; cout <<" ***\n"; cout <<"*****\n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; the code for the diamond: # include <iostream> using namespace std; void main () { cout << " *\n "; cout <<" * *\n"; cout<<" * *\n"; cout<<" * *\n"; cout<<"* *\n"; cout<<" * *\n"; cout<<" * *\n"; cout <<" * *\n"; cout << " *\n "; }


What is the use of using namespace STD in c plus plus programming?

No, the use of 'namespace std' is not compulsory. You can specifiy it on any object reference. Specifying 'namespace' simply provides a default value. Contrast ... using namespace std; cout << "Hello world!" << endl; ... with ... std::cout << "Hello world!" << std::endl;


How to use NS2 programming?

you don't need to use ns2 programming

Related Questions

Could you write the program that display truth table of AND gate by using C plus plus programming language?

#include<iostream> int main() { std::cout << "Truth table for AND gate\n\n"; std::cout << " |0 1\n"; std::cout << "-+---\n"; for (unsigned a=0; a<2; ++a) { std::cout << a << '|'; for (unsigned b=0; b<2; ++b) { std::cout << (a & b) << ' '; } std::cout << '\n'; } std::cout << std::endl; }


Programming in c?

The question is somewhat vague. Could you elaborate?


How is computer programming related to algebra?

Computer Programming is all about algebra. In algebra, you solve for variables like x and y in their simplest form, in programming, the variables can pass on values or accept values and give you the result.For eg:Find the area of a square with side 'a' units.In algebra: Area=a2.In Programming, the program can find the area by taking input from the user.float area,a;couta;area=a*a;cout


What is namespace in c plus plus program?

A namespace is similar to a class in object oriented programming. A namespace contains functions defined by the programmer. for example namespace std contains functions like cout and cin.namespaces can be globaly declared like so: "using namespace std;"which includes all the functions located in the namespace std.if you only need to use cout you can globaly declare only cout like this "using std::cout;"orstd::cout


Write in c-in and c-out in c plus plus and C programming?

In c++, to manipulate output & input you must use cin and cout. I will write a sample program to show you:#include //possibly iostream.husing namespace std; //This is what lets you use cin & coutint main(){cout


Write an application that displays in the command window a box an oval an arrow and a diamond using asterisks as follows?

the code for the box is: # include <iostream> using namespace std; void main () { cout << "*********\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*\t*\n"; cout << "*********\n"; the code for the oval is: # include <iostream> using namespace std; void main () { cout << " ***\n"; cout <<" * *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<"* *\n"; cout <<" * *\n"; cout << " ***\n"; the code for the arrow is: # include <iostream> using namespace std; void main () { cout << " * \n"; cout <<" ***\n"; cout <<"*****\n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; cout <<" * \n"; the code for the diamond: # include <iostream> using namespace std; void main () { cout << " *\n "; cout <<" * *\n"; cout<<" * *\n"; cout<<" * *\n"; cout<<"* *\n"; cout<<" * *\n"; cout<<" * *\n"; cout <<" * *\n"; cout << " *\n "; }


How you can use two input in a single statement in c plus plus?

cout<<"______": cin >>__>>__; [example cout<<"enter no."; cin>>a>>b; ]


Why c in and c out used in c?

In the programming language C++, cin is used to input the variable and cout is used to print a certain message or result.


How do you print 1 to 100 in c without using loop condition?

If you mean you cannot use a for loop, then use a while loop: int i=0 while( i++ < 100 ) std::cout << i << " "; std::cout << std::endl; Or a do-while loop: int i=0; do std::cout << ++i << " "; while( i<100 ); std::cout << std::endl; If these are not allowed either, use a procedural loop: int i=0; again: std::cout << ++i << " "; if( i<100 ) goto again; std::cout << std::endl; If even that is not allowed, then the only option is to hard-wire: std::cout << 1 << " " << 2 << " " << [etc] << 99 << " " << 100 << std::endl; It does seem a pointless exercise when a for loop exists specifically for counting iterations like this: for( int i=1; i<=100; ++i ) std::cout << i << " "; std::cout << std::endl;


Define Cout in Visual C?

Cout is actually a statement used for outputting strings, the values of variables, and anyother thing that you want to be displayed on the screen. following is the syntax of cout statement. cout<<"String"; cout<<variable/arrays/structure variables; Note: / means that you can use any one of them. cout<<variable1<<variable2<<variable3; cout<<"string 1"<<varibale1<<"string 2"; note: we can use any combination of variables and strings we want. The << operator takes value from the variable and transfer it to cout which sends it to the output device normally the monitor using a stream called the output stream. Thanx, Ghulam Nasir(Khan) NIIT Cout is actually a statement used for outputting strings, the values of variables, and anyother thing that you want to be displayed on the screen. following is the syntax of cout statement. cout<<"String"; cout<<variable/arrays/structure variables; Note: / means that you can use any one of them. cout<<variable1<<variable2<<variable3; cout<<"string 1"<<varibale1<<"string 2"; note: we can use any combination of variables and strings we want. The << operator takes value from the variable and transfer it to cout which sends it to the output device normally the monitor using a stream called the output stream. Thanx, Ghulam Nasir(Khan) NIIT


What is the use of using namespace STD in c plus plus programming?

No, the use of 'namespace std' is not compulsory. You can specifiy it on any object reference. Specifying 'namespace' simply provides a default value. Contrast ... using namespace std; cout << "Hello world!" << endl; ... with ... std::cout << "Hello world!" << std::endl;


How to use NS2 programming?

you don't need to use ns2 programming