write a program for input is 56 output will be 5+6=10?
Answer Posted / saranya
#include<stdio.h>
#include<conio.h>
main()
{
int n,a,b=0;
clrscr();
printf("Enter the n value");
scanf("%d",&n);
while(n!=0)
{
a=n%10;
b=b+a;
n=n/10;
}
printf("Result is %d",b);
getch();
}
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
NIC question paper
I want old SBI question papers plzzzzzzzzz
What is The Need of Template?
what is your experience in developing technical specifications?
how to use two diffirent gatway in one system
what are the differences between malloc() and calloc() in c language?
Why is using C language
hi , anyone plz end nic model papers to my id
Write a c pgm to print the letter as per given condition i.e.. if u give 4 out put should b 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
hi this is amit..please help me to out this problem Objective 8: Create Resources (Function libraries) Requirements: Create a new order with the Flight Reservation application. 33. Use the script created above. 34. Write a function using VBScript that will take a date as an input and add 10 to it. i.e. if the date is passed as “15/08/2008” then after adding 10 it should become as “25/08/2008” 35. Use this function to parameterize the step used to enter “Date of Flight” 36. Run the pack thanx & regards
how the parting surface is selected in injection mould
int main() { int d = 10; int m = 2; int y = 3603; int c = 0; int val; val = ( d + m + y + (y/4) + c) % 7; cout << val; return 0; }
how 2 write a program of this pattern usin for loop?? 1 2 3 4 5 6 7 8 9 10
what is the main fuction of OSPF in a internetwork? how does work of same network?
what is the difference between verification and validation