What's new

Closed Patulong naman po ako kung anong kulang salamat po c++

Status
Not open for further replies.
sir patulong po nito di ko po alam san mag sisimula. using printf po sana may code na po ako pero di ko naintindihan haha
Input N integers(Ask from the user how many nos. he/she wants to input). Determine and print the sum of all nos., the average of all numbers, how many odd nos. were inputted, how many even nos. were entered and how many zeroes inputted.
Output:
Enter desireed number to input: 7
Input 7 integers:
25
0
-5
12
0

The sum of all nos is 132
The Average of all nos is 32.00
Od nos inputted: 2
Even nos inputted:2
Zero nos inputted:2
 
#include <iostream>

using namespace std;

char name[50];
int total;

int main()
{
cout<<"Enter Your Name : ";
cin.getline(name,50);

cout<<"Enter Number : ";
cin>>total;

for(int a=0; a<total; a++)
{

cout<<a+1<<". "<<name<<endl;
}
return 0;

}
 
#include <iostream>

using namespace std;

char name[50];
int total;

int main()
{
cout<<"Enter Your Name : ";
cin.getline(name,50);

cout<<"Enter Number : ";
cin>>total;

for(int a=0; a<total; a++)
{

cout<<a+1<<". "<<name<<endl;
}
return 0;

}
This is a c++
C sharp Kasi gamit mong language eh.
Diko kabisado mga arguments Jan pero Ito try mo
 
Status
Not open for further replies.

Similar threads

Back
Top