I looked at the websides you guys gave me still could not find the answers!!!
1. How do you pass an array to a function? example?
2. how do i declare a floating point?
3. What is inderection when talking about pointers?
4. Given the following piece of code, what does cout show?
int*p, i = 15;
p = &I;
*p = 20;
cout<< i ;
5. can a particular array contain integers, floats,...
User Profile
Collapse
-
Functions???
Can anybody show me an example of passing a variable by value to function and of passing a variable by reference to function? -
floating point
How do i declare a constant floating point variable with a value of 3.1416 ? -
-
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()// While loop same Exercise
{
int count=1,
number,
total=0;
cout<< " Give me a number between one and 10:";
cin>> number;
cout<< endl;
while(count <= number)
{
total +=count * count;
...Leave a comment:
-
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int total = 0,
i,
number;
cout<< " Give me a number between one and 10:";
cin>> number;
for( i= 1; i <=number; ++i)
{
total=total+i*i ;
}
cout << "The sum of squares...Leave a comment:
-
Maybe this can help u??????
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int quiz1, // Quiz 1 grade
quiz2, // Quiz 2 grade
quiz3; // Quiz 3 grade
double average; // Average of the three quiz grades
// Setup output stream for one decimal place
cout << setprecision(1)...Leave a comment:
-
ok i just forgot to put a semicolon after the i now it runs but i dont know how to
square the inputs...Leave a comment:
-
like that?
int main()
{
int i;
cout<< endl;
cout<<" Enter integer between 1 and 10 : "<< endl;
cin>>i
return 0;
}
and how do i square all the integers?
english is my second language too i am an international student from germany......Leave a comment:
-
Ok i got that but i am not familiar with all the vocabulary yet
that is my problem:
1. cout<<" Enter integer between 1 and 10:"<< endl;
cin >>integer>>;
please be patient with me i am new to this...Leave a comment:
-
programming problem
Hello everybody i need help with a problem please!!!
I am new to this and just trying to figure my Homework out....
Ok here it comes:
Write a program that asks the user to enter an integer between 1 and 10, sums the squares of the integers from 1 to the number entered, and display the sum. Thus, if the user enters 5, the program should display the following:
The sum of the squares of the integers from...
No activity results to display
Show More
Leave a comment: