Write a program to count the number of characters, number of
words, number of line in file.
Answers were Sorted based on User's Feedback
Answer / jayakrishnan
File.ReadAllLines("").Length;
File.ReadAllText("").Split(' ').Length - 1;
File.ReadAllText("").Length
Is This Answer Correct ? | 5 Yes | 3 No |
Answer / ashutosh mishra
#include <stdio.h>
main()
{
int i,j,n,c=0,b;
printf("enter the number to be checked\n");
scanf("%d",&n);
j=n;
for(i=1;i<n;i++)
{
b=n%i;
if(b==0)
{
c=c+i;
}
}
if(c==j)
printf("the given number is perfect number\n");
else
printf("the given number is not a perfect number\n");
getch();
}
Is This Answer Correct ? | 5 Yes | 11 No |
how to get the table names via c sharp and column names also?
I am developing a web application using google map api.I want to update the map inside the div control within update panel. I got other controls updated but map doesn't get updated.I do not not want to update map whenever unnecessary controls are fired at server side.How could it be achieved?
Write a program to count 3Letter, 4Letter and 5Letter words from a file and print the number of 3Letter, 4Letter and 5Letter words. Delimiter is space, tab, hifen. Also we should not consider the line in the file after we encounter # in that line.
. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long
program to reverse the order of words in a string.
Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string
Using C# Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9 The program should check the high number that the user inputs to ensure that it does not exceed the size of any array you might be using for storage.
Automatically Hyperlink URLs and E-Mail Addresses in ASP.NET Pages with C#
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.
How to Link Different Data Sources Together?
working with arrays