Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F first-contributions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 322
    • Merge requests 322
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • First Contributions
  • first-contributions
  • Merge requests
  • !20799
An error occurred while fetching the assigned milestone of the selected merge_request.

example number 3

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/MrUnfunny/master into master 5 years ago
  • Overview 0
  • Commits 6
  • Pipelines 0
  • Changes 4

Created by: MrUnfunny

Compare
  • master (base)

and
  • latest version
    ebdc1843
    6 commits, 2 years ago

4 files
+ 77
- 0

    Preferences

    File browser
    Compare changes
Fibonn‎aci.cpp‎ +17 -0
Palindr‎ome.cpp‎ +1 -0
Pyram‎id.cpp‎ +25 -0
armstr‎ong.cpp‎ +34 -0
Fibonnaci.cpp 0 → 100644
+ 17
- 0
  • View file @ ebdc1843

#include <stdio.h>
int main()
{
int a=0,b=1,i=0,j,n,f;
printf("Enter a number:");
scanf("%d",&n);
while(i!=n)
{
printf(" %d ",a);
f=a+b;
a=b;
b=f;
i++;
}
return 0;
}
Palindrome.cpp 0 → 100644
+ 1
- 0
  • View file @ ebdc1843

Pyramid.cpp 0 → 100644
+ 25
- 0
  • View file @ ebdc1843

#include<stdio.h>
int main()
{
int i,j,n;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
for(j=n;j>=i;j--)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("*");
}
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
}
armstrong.cpp 0 → 100644
+ 34
- 0
  • View file @ ebdc1843

#include<stdio.h>
int main()
{
int k,a,b,c=0,d,e,f,g,h=0;
printf("Enter a number:");
scanf("%d",&a);
b=a;
while(b!=0)
{
b=b/10;
c++;
}
for(d=1;d<=c;d++)
{
e=a%10;
g=e;
for(f=1;f<c;f++)
{
e=g*e;
}
h=h+e;
a=a/10;
}
if(h==k)
{printf("%d is armstrong number!",h);
}
else
{
printf("%d is not an armstrong number.",h);
}
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: github/fork/MrUnfunny/master

Menu

Explore Projects Groups Snippets