C Program Question 1 Answer(s) 3 years and 5 months ago
Posted in : Development process
How i can calulate sum of First digit and last digit of Five Numbers. e.g 12345 i want to calculate 1+5=6 how i can calculate in C Program?
View Answers
January 22, 2010 at 4:56 PM
Hi Friend,
Try the following code:
#include <stdio.h> #include <conio.h> void main(){ int i; int list[5]; int first,last; int sum,num; clrscr(); printf("Enter five digit number:"); for( i = 0; i <5;i++){ scanf("%d",&num); list[i]=num; } first=list[0]; last=list[4]; sum=first+last; printf("Sum of first and last number is: %d",sum); getch(); }
Thanks
Related Pages:
question for c++ question for c++ write Program to swap between two numbers if first number is greater than second number and total of two numbers greater than 10
C# question C# question Write a program in C# to create 3*4 matrix and show the sum of diagonal values
C# question C# question Write a program in C# to create 3*4 matrix and show the sum of diagonal values
C Program Question - Development process CProgram Question How i can calulate sum of First digit and last digit of Five Numbers.
e.g 12345
i want to calculate 1+5=6
how i can calculate in CProgram?
Hi Friend,
Try the following code
C program C program hi, here is my question:
Create a structure to specify data on students given below: Roll number, Name,Department, Course, Year... a function to print names of all students who joined in a particular year. (c
C++ question 3 C++ question - add the two matrices and display the elements of resultant matrix.
Write a program to accept from user elements of two 2x3 matrices....
C sum of two matrices
The given code allow the user to enter
C# question
Create a Solution by name Bank with Classes Account.cs, SavingsAccount.cs and savingsTest.cs to Demonstrate Abstract Classes in C# 1st question... and savingsTest.cs to Demonstrate Abstract Classes in C
C# question C# question Explain enumeration base types in C
C# question C# question In C#, string is a class or primitive type. Explain
C# question C# question How can we call method pass by reference in C
c question c question How to convert decimal numbers into binary digits without using pow function in c language
C/C++/JAVA Question on function C/C++/JAVA Question on function "Write a function to find out common... other data type also.�
Question can be solved in C,C++ or JAVA.
(Recommneded - C
program of c program of c write a program in c to display a to z without using printf or scanf statements or header files
c++ program c++ program Write a program which reads a text from the keyboard and displays the following information on the screen in two columns:
(a) Number of lines
(b) Number of words
(c) Number of characters
Strings should be left
C Program C Program Why doesn't the code
int a = 1000, b = 1000;
long int c = a * b;
work?
plz help me sir
c program c program How to convert binary digits to decimal number without using power function
C# C# i need a code that will make program perform the basic operations upon the data Listview save, update and cancel
c program c program plz send me program for this. write a program to print the following code? (in c language)
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 11
2 3 4 5 6 7 8 9 10
c++ c++ write a program that gets a key or character from the keyboard and displays it ASII code in decimal, hexadecimal and binary form.It must also give a description of the key pressed
c++ c++ .write a program that accepts 5 subjects of a student,it should have a function to calculate the average & another function to grade.grade should be as follows-<40=E,40-49=D,50-59=C,60-69=B & >70
c program c program plz send me program for this. write a program to print the following code?
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 11
2 3 4 5 6 7 8 9 10 11 12
3 4
program in c program in c Write a program that inputs five different integers from the keyboard, then print the sum, the product, the smallest and the largest of these numbers. Use only single selection form of if statement.
For example: 1 3
turbo C Question 6.
turbo CQuestion 6. Explain call by value and call by reference with easy examples
c++ c++ Write the definition of the class dayType that implements the day of the
week in a program. The class dayType should store the day, such as
Sunday for Sunday. The program should be able to perform the following
operations
c++ c++ Write a console based C++ program that reads student information from a text file, build an array of objects of type class StudentInfo... name with the minimum GPA
7) Display Student GPAs as Letter Grades (A, B, C, D
turbo C Question 4.
turbo CQuestion 4. Possible to print the following (Using for Loops):
1. *
**
2.*
*
**
*
*
*
*
specify the format properly
turbo C Question 4.
turbo CQuestion 4. Possible to print the following (Using for Loops):
1. *
**
2.*
*
**
*
*
*
*
specify the format properly
c++ - AOP c++ hi friends,i got this question and i need u help.
"Two subjects....
a program is required which will read in the marks as above for each students... candidate number.use the for loop statements to develop the program".
my
C++Tutorials
of standard C libraries are written beginning with a c. In order for the program...
C++ Tutorials
C++
Tutorial
turbo C Question 5.
turbo CQuestion 5. is it possible to print "", 1st line (5 times),2nd line *(4 times),3rd line *(3 times),4th line *(2 times) & 5th line *(1 times) with Align Right. and also reverse order as 1,2,3,4,5 (but right aline
Question Question When there is an exception in my program how java runtime system handles
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question question sir plz tell me what should i give in title box. just i want java program for the question typed in this area
C++ Question 2 C++ Triangle and Rectangle - calculate area of Triangle and rectangle using data members from base class 2.create class. Shape accepts two values (Data Type: Double). Create two derived classes Triangle and Rectangle ; calculate
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu 1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu 1) Write a full program for the bubble sort algorithm. User is required to enter specific input numbers and the program will be able to sort the given numbers
my question
my question "Write a C/C++ program to show the stored procedure PROCRESETMAIL" on database "USER_NOTIFY
my question
my question "Write a C/C++ program to show the stored procedure PROCRESETMAIL" on database "USER_NOTIFY
method overloading in c program
method overloading in c program how is method overloading in Cprogram is different from C++ program
malloc in c example program
malloc in c example program What is malloc in c? Please explain the term using an example in Cprogram.
Thanks
Ask C/C++ Questions online
programming question in C and C++ and feel easy. Our expertise will answer all...
Ask C/C++ Questions online
C and C++ are different programming
C program - SQL C program Write a Cprogram for airport simulation using queue data structures.
Please reply me
question
question i need a jsp program to get system ip address
please give me a java program for the following question
please give me a java program for the following question Write a java program that displays multiple frames :
Step 1: Design a frame with three...");
Icon icon1 = new ImageIcon("c:/fruit.png");
JButton button2=new JButton("Bird
question
question i need a jsp program to list all employees on leave +mysql
question
question i need a jsp and mysql program to display all employees on leave
question
question how to run a jsp program while ubundu(linux) boot up