ఇంటిపని 1 నిమిత్తం చేయమన్నదానికి అధ్యాపకుని జవాబు
//c-prog written by vikrambhayya2019@gmail.com 19-8-20 for 1_32 math magic
#include <stdio.h>
#include<math.h>
void main()
{
int c[5][16]={
{1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31},
{2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31},
{4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31},
{8,9,10,11,12,13,14,15,16,24,25,26,27,28,29,30,31},
{16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}
};
int empika[5]; //choice
int p,q,mee_samkhya=0;
printf("gaNita chamatkaaraaniki swaagatam\n\n");
for(p=0;p<5;p++)
{
for(q=0;q<16;q++)
{
printf("%3d",c[p][q]);
}
printf("\n\n Is ur number is in the list press 1 else 0:");
scanf("%d",&empika[p]);
mee_samkhya=mee_samkhya+empika[p]*pow(2,p);
}
printf("\n\n meeru talchukunnadi = %3d",mee_samkhya);
}
#include <stdio.h>
#include<math.h>
void main()
{
int c[5][16]={
{1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31},
{2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31},
{4,5,6,7,12,13,14,15,20,21,22,23,28,29,30,31},
{8,9,10,11,12,13,14,15,16,24,25,26,27,28,29,30,31},
{16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}
};
int empika[5]; //choice
int p,q,mee_samkhya=0;
printf("gaNita chamatkaaraaniki swaagatam\n\n");
for(p=0;p<5;p++)
{
for(q=0;q<16;q++)
{
printf("%3d",c[p][q]);
}
printf("\n\n Is ur number is in the list press 1 else 0:");
scanf("%d",&empika[p]);
mee_samkhya=mee_samkhya+empika[p]*pow(2,p);
}
printf("\n\n meeru talchukunnadi = %3d",mee_samkhya);
}
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.