Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

!! I want this same code using only stdio library. but it should not be written in a similar way, let it be written in

!! I want this same code using only stdio library. but it should not be written in a similar way, let it be written in a different way. just use C language

#include int palid(int x){ int temp[20],dummy=x,size=0,m,i; while(dummy){ temp[size]=dummy%10; dummy/=10; size++; } m=size-1; if(size%2!=0){ size++; }

for(i=0;i

int main(){

int n,i,j,num=1,num1=0; printf("Please enter an upper bound: "); scanf("%d",&n); printf("%d ",n); if(n<101){ if(n>=0){

printf("There are 0 ultra magic numbers up to %d.",n); return 0; }else{ printf("Upper bound can not be negative."); return 0; } }else{ for(i=101;i<=n;i++){ j=palid(i); if(j==1){ j=check(i); } if(j==1){ printf("%d ",i); num++; num1++; } if(num%10==0 ){ printf(" "); num=1; } } } if(num <10){ printf(" "); } printf("There are %d ultra magic numbers up to %d.",num1,n); return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

c. Price rises and supply is elastic.

Answered: 1 week ago