🔒 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.

About this Thread

  • 24
    Replies
  • 918
    Views
  • 6
    Participants
Last reply from:
Ambabo

Trending Topics

Online now

Members online
1,029
Guests online
3,474
Total visitors
4,503

Forum statistics

Threads
2,331,782
Posts
29,260,331
Members
1,147,815
Latest member
groudon
Back
Top