User Profile
Collapse
-
hell o world
hey people.java newbie here with java.Why can't i use jre for my helloworld program-path's gotta be jdk? -
legal validation construct?
[code=c]int d;
scanf("%d",&r);
r=getchar();[/code] Is this a legal validation construct? -
Validation _ctype.h
Hi>Using ctype.h header file I want to validate user input such that if they enter input of the type not specified an error message is generated and the user then gets a chance to input again_I haven't been able to do the latter>Please help:
#include<stdio. h>
#include<ctype. h>
Printf("Name:") ;
scanf("%s",&Nam e);
isalpha(Name);/*error output if user inputs integer. however... -
Calculating age inc
How do i calculate someones age using the time.h header file?
see Code below:
#include<time.h >
.......
printf("Enter Year of birth 19:");
scanf("%c",&yob );/*from here calculate age using computers system clock */
Pls help. -
-
Validation
Hi.Am Using switch -case statements (see below)and i have cases 1-5 .If the user inputs a character I want an error message printed out prompting the user to re enter his\her choice.how do i get that done?pls help
int choice;
.......
........
scanf("%d",&cho ice)
switch(choice){
case 1:printf(....
......
break;
case 2:..... -
for counter
Wsp c people.code below's supposed to printout the sum of all integers less than and including the limit specified by user.Something' s missing or wrong_ I jus can't figure out what, pls help.
#include<stdio. h>
main ()
{
int limit,i,sum;
printf("Input limit:");
scanf("%d",&lim it);
for(i=limit;i>0 ;i--)
sum=sum+i;
printf("%d\n",s um);... -
<removed>.Or is there more to it than just that? -
Thanx.Works fine.how about modifying that to printout a pyramid of asterisk?I intend to use if -else statements.Is there an easier way out?Leave a comment:
-
Square of asterisk in c
Hi.I want to print out a 5 by 5 square of asterisks in c using nested for loops.I tried but my code(see below) resulted in an infinite loop.Pls help.
[code=c]
#include<stdio. h>
main()
{
int x,y,c=5;
for(x=c;x<=c;x--)
{
for(y=c;y<=c;y--)
printf("*");
}
printf("\n");
}[/code] -
Today's date in c
Hi. am writing code that needs validation of some1's age Such that the compiler calculates their age by substracting their year of birth from current year.How do i do that?Newbie here pls help.Thnx.
No activity results to display
Show More
Leave a comment: