🔒 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
  • 911
    Views
  • 6
    Participants
Last reply from:
Ambabo

Trending Topics

Online now

Members online
527
Guests online
3,104
Total visitors
3,631

Forum statistics

Threads
2,306,992
Posts
29,175,590
Members
1,194,130
Latest member
ohkgdgh
Back
Top