Commit cb92a8e5 authored by Kiril Klein's avatar Kiril Klein
Browse files

Upload New File

parent dd36c79d
Pipeline #31013 failed with stage
in 0 seconds
#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;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment