Skip to content
Snippets Groups Projects
Commit cb92a8e5 authored by Kiril Klein's avatar Kiril Klein
Browse files

Upload New File

parent dd36c79d
No related branches found
No related tags found
No related merge requests found
Pipeline #31013 failed
#include <iostream>
/*
For this task, read in a number n on cin and print out the first n square numbers each in their own line
*/
int main(int argc, char **argv) {
int n;
std::cout<< "Enter a number:"<<std::endl;
std::cin>>n;
std::cout<<std::endl;
for(int i=0; i<=n; i++){
std::cout<<i*i<<"\n";
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment