Ps Problem Answer
Ps Problem Answer
#include <stdio.h>
int main()
int n,sum=0;
scanf("%d",&n);
while(n!=0||sum>=10){
if(n==0){
n=sum;
sum=0;
sum+=n%10;
n/=10;
printf("%d",sum);
return 0;
}
Patten:
5 prime after given n
Interger to roman
Cube of nxt three numbers
Nxt 5 plaindrome
Print pattern in multiple of 5 by getting input row
Geometric progression
Digit incremeter(or)Program To Increment By 1 To All The Digits Of A Given Integer Input : 203
Output: 314
Get input row from user and print the following pattern. Input : 3 Output: A
BB
CCC
1.Find Whether the number is abundant number or not I/P:12 Output : Abundant number
explanation:1+2+3+4+6=16 which is 16>12 so it is abundant
Floyd's triangle
Harmonic progression
Pattern printing : Input 6 (Only the rows with prime numbers should be printed
Sum of prime
1.1-x^2/2!+x^4/4!-x^6/6!........ find the sum of the series. no of terms and x values will be given